diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-06-13 21:09:27 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-06-13 21:09:27 +0300 |
commit | f7fdb4ef4e5021b2f96d96af9aa0d467ece9660f (patch) | |
tree | 98e0f94cc25ca4770748ff789b2207ade75734fe /utilities.cpp | |
parent | 16b58b001d519a36ec7584d09face4def90f36e4 (diff) |
gettings jabber api's code )
Diffstat (limited to 'utilities.cpp')
-rw-r--r-- | utilities.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/utilities.cpp b/utilities.cpp index 170dcca..b2c28f0 100644 --- a/utilities.cpp +++ b/utilities.cpp @@ -30,6 +30,30 @@ TCHAR* __stdcall UniGetContactSettingUtf(HANDLE hContact, const char *szModule,c return szRes; } +extern IJabberInterface *JabberInterface[10]; +extern int JabberAccountsCount; + +int GetJabberInterface(WPARAM, LPARAM) //get interface for all jabber accounts, options later +{ + IJabberInterface *JIftmp[50]; //should it be dynamic ? + int count = 0; + PROTOACCOUNT **accounts; + ProtoEnumAccounts(&count, &accounts); + JabberAccountsCount = 0; + for(int i = 0; i < count; i++) + { + char *tmp = mir_u2a(accounts[i]->tszAccountName); + JIftmp[i] = getJabberApi(tmp); + if(JIftmp[i]) + { + JabberInterface[JabberAccountsCount] = JIftmp[i]; + JabberAccountsCount++; + } + mir_free(tmp); + } + return 0; +} + char *date() { |