123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384 |
- #ifndef KC_KCORE_HPP
- #define KC_KCORE_HPP 1
- #include <mapi.h>
- #include <mapidefs.h>
- #include <kopano/ECTags.h>
- #include <kopano/Trace.h>
- #pragma pack(push,1)
- struct EID {
- BYTE abFlags[4];
- GUID guid;
- ULONG ulVersion;
- USHORT usType;
- USHORT usFlags;
- GUID uniqueId;
- CHAR szServer[1];
- CHAR szPadding[3];
- EID(USHORT usType, const GUID &guid, const GUID &uniqueId, USHORT usFlags = 0)
- {
- memset(this, 0, sizeof(EID));
- this->ulVersion = 1;
- this->usType = usType;
- this->usFlags = usFlags;
- this->guid = guid;
- this->uniqueId = uniqueId;
- }
- EID(const EID *oldEID)
- {
- memset(this, 0, sizeof(EID));
- this->ulVersion = oldEID->ulVersion;
- this->usType = oldEID->usType;
- this->guid = oldEID->guid;
- this->uniqueId = oldEID->uniqueId;
- }
- EID() {
- memset(this, 0, sizeof(EID));
- this->ulVersion = 1;
- }
- };
- struct EID_V0 {
- BYTE abFlags[4];
- GUID guid;
- ULONG ulVersion;
- USHORT usType;
- USHORT usFlags;
- ULONG ulId;
- CHAR szServer[1];
- CHAR szPadding[3];
- EID_V0(USHORT usType, const GUID &guid, ULONG ulId)
- {
- memset(this, 0, sizeof(EID_V0));
- this->usType = usType;
- this->guid = guid;
- this->ulId = ulId;
- }
- EID_V0(const EID_V0 *oldEID)
- {
- memset(this, 0, sizeof(EID_V0));
- this->usType = oldEID->usType;
- this->guid = oldEID->guid;
- this->ulId = oldEID->ulId;
- }
- EID_V0() {
- memset(this, 0, sizeof(EID_V0));
- }
- };
- #pragma pack(pop)
- struct ABEID {
- BYTE abFlags[4];
- GUID guid;
- ULONG ulVersion;
- ULONG ulType;
- ULONG ulId;
- CHAR szExId[1];
- CHAR szPadding[3];
- ABEID(ULONG ulType, const GUID &guid, ULONG ulId) {
- memset(this, 0, sizeof(ABEID));
- this->ulType = ulType;
- this->guid = guid;
- this->ulId = ulId;
- }
- ABEID(const ABEID *oldEID)
- {
- memset(this, 0, sizeof(ABEID));
- this->ulType = oldEID->ulType;
- this->guid = oldEID->guid;
- this->ulId = oldEID->ulId;
- }
- ABEID() {
- memset(this, 0, sizeof(ABEID));
- }
- };
- typedef struct ABEID *PABEID;
- #define _CbABEID(p) ((sizeof(ABEID)+strlen((char*)(p)->szExId))&~3)
- #define CbABEID(p) (sizeof(ABEID)>_CbABEID((p))?sizeof(ABEID):_CbABEID((p)))
- #define _CbNewABEID(p) ((sizeof(ABEID)+strlen((char*)(p)))&~3)
- #define CbNewABEID(p) (sizeof(ABEID)>_CbNewABEID((p))?sizeof(ABEID):_CbNewABEID((p)))
- static inline ULONG ABEID_TYPE(const ABEID *p)
- {
- return p != nullptr ? p->ulType : -1;
- }
- template<typename T> static inline ULONG ABEID_ID(const T *p)
- {
- return p != nullptr ? reinterpret_cast<const ABEID *>(p)->ulId : 0;
- }
- struct SIEID {
- BYTE abFlags[4];
- GUID guid;
- ULONG ulVersion;
- ULONG ulType;
- ULONG ulId;
- CHAR szServerId[1];
- CHAR szPadding[3];
- SIEID(ULONG ulType, const GUID &guid, ULONG ulId)
- {
- memset(this, 0, sizeof(SIEID));
- this->ulType = ulType;
- this->guid = guid;
- this->ulId = ulId;
- }
- SIEID(const SIEID *oldEID)
- {
- memset(this, 0, sizeof(SIEID));
- this->ulType = oldEID->ulType;
- this->guid = oldEID->guid;
- this->ulId = oldEID->ulId;
- }
- SIEID() {
- memset(this, 0, sizeof(SIEID));
- }
- };
- typedef struct SIEID *LPSIEID;
- #define KOPANO_FAVORITE 0x01
- enum
- {
- XPID_NAME,
- XPID_EID,
- XPID_SEARCH_KEY,
- XPID_STORE_EID,
- XPID_ADDRESS,
- XPID_ADDRTYPE,
- NUM_IDENTITY_PROPS
- };
- #define TRANSPORT_ADDRESS_TYPE_SMTP _T("SMTP")
- #define TRANSPORT_ADDRESS_TYPE_ZARAFA _T("ZARAFA")
- #define TRANSPORT_ADDRESS_TYPE_FAX _T("FAX")
- typedef EID * PEID;
- #define CbEID(p) (sizeof(EID)+strlen((char*)(p)->szServer))
- #define CbNewEID(p) (sizeof(EID)+strlen(((char*)p)))
- #define EID_TYPE_STORE 1
- #define EID_TYPE_OBJECT 2
- #ifndef STORE_HTML_OK
- #define STORE_HTML_OK 0x00010000
- #endif
- #ifndef STORE_ANSI_OK
- #define STORE_ANSI_OK 0x00020000
- #endif
- #ifndef STORE_LOCALSTORE
- #define STORE_LOCALSTORE 0x00080000
- #endif
- #ifndef STORE_UNICODE_OK
- #define STORE_UNICODE_OK 0x00040000L
- #endif
- #ifndef STORE_PUSHER_OK
- #define STORE_PUSHER_OK ((ULONG) 0x00800000)
- #endif
- #define EC_SUPPORTMASK_PRIVATE \
- STORE_ENTRYID_UNIQUE | \
- STORE_SEARCH_OK | \
- STORE_MODIFY_OK | \
- STORE_CREATE_OK | \
- STORE_ATTACH_OK | \
- STORE_OLE_OK | \
- STORE_NOTIFY_OK | \
- STORE_MV_PROPS_OK | \
- STORE_CATEGORIZE_OK | \
- STORE_RTF_OK | \
- STORE_RESTRICTION_OK | \
- STORE_SORT_OK | \
- STORE_HTML_OK | \
- STORE_UNICODE_OK | \
- STORE_SUBMIT_OK
- #define EC_SUPPORTMASK_ARCHIVE \
- STORE_ENTRYID_UNIQUE | \
- STORE_SEARCH_OK | \
- STORE_MODIFY_OK | \
- STORE_CREATE_OK | \
- STORE_ATTACH_OK | \
- STORE_OLE_OK | \
- STORE_NOTIFY_OK | \
- STORE_MV_PROPS_OK | \
- STORE_CATEGORIZE_OK | \
- STORE_RTF_OK | \
- STORE_RESTRICTION_OK | \
- STORE_SORT_OK | \
- STORE_HTML_OK | \
- STORE_UNICODE_OK
- #define EC_SUPPORTMASK_DELEGATE \
- STORE_ENTRYID_UNIQUE | \
- STORE_SEARCH_OK | \
- STORE_MODIFY_OK | \
- STORE_CREATE_OK | \
- STORE_ATTACH_OK | \
- STORE_OLE_OK | \
- STORE_NOTIFY_OK | \
- STORE_MV_PROPS_OK | \
- STORE_CATEGORIZE_OK | \
- STORE_RTF_OK | \
- STORE_RESTRICTION_OK | \
- STORE_SORT_OK | \
- STORE_HTML_OK | \
- STORE_UNICODE_OK | \
- STORE_SUBMIT_OK
- #define EC_SUPPORTMASK_PUBLIC \
- STORE_ENTRYID_UNIQUE | \
- STORE_SEARCH_OK | \
- STORE_MODIFY_OK | \
- STORE_CREATE_OK | \
- STORE_ATTACH_OK | \
- STORE_OLE_OK | \
- STORE_NOTIFY_OK | \
- STORE_MV_PROPS_OK | \
- STORE_CATEGORIZE_OK | \
- STORE_RTF_OK | \
- STORE_RESTRICTION_OK | \
- STORE_SORT_OK | \
- STORE_HTML_OK | \
- STORE_UNICODE_OK | \
- STORE_PUBLIC_FOLDERS
- #define WCLIENT_DLL_NAME "zarafa6client.dll"
- #define ECFREEBUSY_DEFAULT_PUBLISH_MONTHS 6
- #define TABLE_CAP_STRING 255
- #define TABLE_CAP_BINARY 511
- #ifdef WITH_GZIP
- #define KOPANO_CAP_COMPRESSION 0x0001
- #else
- #define KOPANO_CAP_COMPRESSION 0x0000
- #endif
- #define KOPANO_CAP_MAILBOX_OWNER 0x0002
- #define KOPANO_CAP_CRYPT 0x0008
- #define KOPANO_CAP_LARGE_SESSIONID 0x0010
- #define KOPANO_CAP_LICENSE_SERVER 0x0020
- #define KOPANO_CAP_MULTI_SERVER 0x0040
- #define KOPANO_CAP_ENHANCED_ICS 0x0100
- #define KOPANO_CAP_LOADPROP_ENTRYID 0x0080
- #define KOPANO_CAP_UNICODE 0x0200
- #define KOPANO_CAP_MSGLOCK 0x0400
- #define KOPANO_CAP_EXPORT_PROPTAG 0x0800
- #define KOPANO_CAP_IMPERSONATION 0x1000
- #define KOPANO_CAP_MAX_ABCHANGEID 0x2000
- #define KOPANO_CAP_EXTENDED_ANON 0x4000
- #define KOPANO_LATEST_CAPABILITIES KOPANO_CAP_CRYPT | KOPANO_CAP_LICENSE_SERVER | KOPANO_CAP_LOADPROP_ENTRYID | KOPANO_CAP_EXPORT_PROPTAG | KOPANO_CAP_IMPERSONATION
- #define KOPANO_LOGON_NO_UID_AUTH 0x0001
- #define MTOM_ID_EXPORTMESSAGES "idExportMessages"
- #endif
|