summaryrefslogtreecommitdiff
path: root/plugins/Variables/src/contact.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-09-15 22:11:32 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-09-15 22:11:32 +0000
commitab8132461435e134601c4bc58ba5e964c1f8a66f (patch)
tree02b9e379764da8598b888517a65bed40476f8ff9 /plugins/Variables/src/contact.h
parent7d5871cc01ffa850894827d5c0b7594ff95da3f8 (diff)
unused service removed (MS_VARS_GETCONTACTFROMSTRING)
git-svn-id: http://svn.miranda-ng.org/main/trunk@6082 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Variables/src/contact.h')
-rw-r--r--plugins/Variables/src/contact.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/plugins/Variables/src/contact.h b/plugins/Variables/src/contact.h
index 7d980801f3..3a9b456d27 100644
--- a/plugins/Variables/src/contact.h
+++ b/plugins/Variables/src/contact.h
@@ -74,5 +74,46 @@
#define PROTOID_HANDLE "_HANDLE_"
+// Note: The hContacts array needs to be freed after use using mir_free
+
+typedef struct {
+ int cbSize; // Set this to sizeof(CONTACTSINFO).
+ union {
+ char *szContact; // String to search for, e.g. last name (can't be NULL).
+ WCHAR *wszContact;
+ TCHAR *tszContact;
+ };
+ HANDLE *hContacts; // (output) Array of contacts found.
+ DWORD flags; // Contact details that will be matched with the search
+ // string (flags can be combined).
+} CONTACTSINFO;
+
+// Possible flags:
+#define CI_PROTOID 0x00000001 // The contact in the string is encoded
+ // in the format <PROTOID:UNIQUEID>, e.g.
+ // <ICQ:12345678>.
+#define CI_NICK 0x00000002 // Search nick names.
+#define CI_LISTNAME 0x00000004 // Search custom names shown in contact
+ // list.
+#define CI_FIRSTNAME 0x00000008 // Search contact's first names (contact
+ // details).
+#define CI_LASTNAME 0x00000010 // Search contact's last names (contact
+ // details).
+#define CI_EMAIL 0x00000020 // Search contact's email adresses
+ // (contact details).
+#define CI_UNIQUEID 0x00000040 // Search unique ids of the contac, e.g.
+ // UIN.
+#define CI_CNFINFO 0x40000000 // Searches one of the CNF_* flags (set
+ // flags to CI_CNFINFO|CNF_X), only one
+ // CNF_ type possible
+#define CI_UNICODE 0x80000000 // tszContact is a unicode string
+ // (WCHAR*).
+
+#if defined(UNICODE) || defined(_UNICODE)
+#define CI_TCHAR CI_UNICODE // Strings in structure are TCHAR*.
+#else
+#define CI_TCHAR 0
+#endif
+
TCHAR *encodeContactToString(HANDLE hContact);
HANDLE *decodeContactFromString(TCHAR *tszContact);