summaryrefslogtreecommitdiff
path: root/utilities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utilities.cpp')
-rw-r--r--utilities.cpp24
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()
{