diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-11-18 20:37:19 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-11-18 20:37:19 +0000 |
commit | 0e80ad0d4c150fa947849cdad07a7d0d34d7340e (patch) | |
tree | 7034b8267ed219c615c4b135778e80a1ede16923 /plugins/!NotAdopted/sametime/clist_util.cpp | |
parent | 8598a4a7a0bc922c4c1c768b55f596cc6d8a0d44 (diff) |
Add sametime protocol sources (not adopted)
git-svn-id: http://svn.miranda-ng.org/main/trunk@6935 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/!NotAdopted/sametime/clist_util.cpp')
-rw-r--r-- | plugins/!NotAdopted/sametime/clist_util.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/plugins/!NotAdopted/sametime/clist_util.cpp b/plugins/!NotAdopted/sametime/clist_util.cpp new file mode 100644 index 0000000000..013f38d144 --- /dev/null +++ b/plugins/!NotAdopted/sametime/clist_util.cpp @@ -0,0 +1,23 @@ +#include "clist_util.h"
+
+int GroupNameExists(const char *name, int skipGroup)
+{
+ char idstr[33];
+ DBVARIANT dbv;
+ int i;
+
+ for (i = 0;; i++) {
+ if (i == skipGroup)
+ continue;
+ itoa(i, idstr, 10);
+ if (DBGetContactSettingStringUtf(NULL, "CListGroups", idstr, &dbv))
+ break;
+ if (strcmp(dbv.pszVal + 1, name) == 0) {
+ DBFreeVariant(&dbv);
+ return i + 1;
+ }
+ DBFreeVariant(&dbv);
+ }
+ return 0;
+}
+
|