17:39
[skypekit:skypekit.git] / skypekit_2.0.0.190_29281_CB30 / interfaces / skype / cpp_embedded / src / client / caccount.cpp
1 #include "caccount.h"
2 #include "main.h"
3
4 CAccount::CAccount(unsigned int oid, SERootObject* root)
5                 : Account(oid, root)
6 {        
7         fprintf(stderr,"New account oid %d\n", getOID());
8         fflush(stderr);
9 }
10
11 void CAccount::OnChange(int prop)
12 {
13         SEString value = GetProp(prop);
14         SEStringList dbg = getPropDebug(prop, value);
15         
16         fprintf(stderr,"ACCOUNT.%s:%s = %s\n", (const char*)GetStrProp(Account::P_SKYPENAME), (const char*)dbg[1], (const char*)dbg[2]);
17         fflush(stderr);
18
19         if (prop == P_STATUS) {
20                 if ((Account::STATUS)GetUintProp(Account::P_STATUS) == Account::LOGGED_IN) {
21                         //(re)create CONTACTS_WAITING_MY_AUTHORIZATION upon login so the new authrequest events will be received
22                         if (skype->GetHardwiredContactGroup(ContactGroup::CONTACTS_WAITING_MY_AUTHORIZATION, auth_reqs_group)) {
23                                 uint nrofcontacts;
24                                 auth_reqs_group->GetPropNrofcontacts(nrofcontacts);                            
25                         }               
26                 }
27         }
28 }
29
30 Account::STATUS CAccount::getStatus()
31 {
32         return (Account::STATUS)GetUintProp(Account::P_STATUS);
33 }
34