diff options
Diffstat (limited to 'protocols/Tlen/src/tlen_misc.cpp')
-rw-r--r-- | protocols/Tlen/src/tlen_misc.cpp | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/protocols/Tlen/src/tlen_misc.cpp b/protocols/Tlen/src/tlen_misc.cpp index 4c05d5e566..7876d2348e 100644 --- a/protocols/Tlen/src/tlen_misc.cpp +++ b/protocols/Tlen/src/tlen_misc.cpp @@ -123,88 +123,3 @@ HANDLE TlenDBCreateContact(TlenProtocol *proto, char *jid, char *nick, BOOL temp }
return hContact;
}
-
-static void TlenContactListCreateClistGroup(char *groupName)
-{
- char str[33], newName[128];
- int i;
- DBVARIANT dbv;
- char *name;
-
- for (i=0;;i++) {
- itoa(i, str, 10);
- if (db_get(NULL, "CListGroups", str, &dbv))
- break;
- name = dbv.pszVal;
- if (name[0] != '\0' && !strcmp(name+1, groupName)) {
- // Already exist, no need to create
- db_free(&dbv);
- return;
- }
- db_free(&dbv);
- }
-
- // Create new group with id = i (str is the text representation of i)
- newName[0] = 1 | GROUPF_EXPANDED;
- strncpy(newName+1, groupName, sizeof(newName)-1);
- newName[sizeof(newName)-1] = '\0';
- db_set_s(NULL, "CListGroups", str, newName);
- CallService(MS_CLUI_GROUPADDED, i+1, 0);
-}
-
-void TlenContactListCreateGroup(char *groupName)
-{
- char name[128];
- char *p;
-
- if (groupName == NULL || groupName[0] == '\0' || groupName[0] == '\\') return;
-
- strncpy(name, groupName, sizeof(name));
- name[sizeof(name)-1] = '\0';
- for (p=name; *p != '\0'; p++) {
- if (*p == '\\') {
- *p = '\0';
- TlenContactListCreateClistGroup(name);
- *p = '\\';
- }
- }
- TlenContactListCreateClistGroup(name);
-}
-
-
-struct FORK_ARG {
- HANDLE hEvent;
- void (__cdecl *threadcode)(void*);
- void *arg;
-};
-
-static void __cdecl forkthread_r(struct FORK_ARG *fa)
-{
- void (*callercode)(void*) = fa->threadcode;
- void *arg = fa->arg;
- Thread_Push(0);
- SetEvent(fa->hEvent);
- callercode(arg);
- Thread_Pop();
- return;
-}
-
-unsigned long TlenForkThread(
- void (__cdecl *threadcode)(void*),
- unsigned long stacksize,
- void *arg
-)
-{
- unsigned long rc;
- struct FORK_ARG fa;
-
- fa.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
- fa.threadcode = threadcode;
- fa.arg = arg;
- rc = _beginthread((void (__cdecl *)(void*))forkthread_r, stacksize, &fa);
- if ((unsigned long) -1L != rc) {
- WaitForSingleObject(fa.hEvent, INFINITE);
- }
- CloseHandle(fa.hEvent);
- return rc;
-}
|