diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-08-11 21:19:54 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-08-11 21:19:54 +0000 |
commit | 4f3031386a93610686ce917c47582fa04f3d5eca (patch) | |
tree | 6f420819c8945b4b18b9e45e4964baf188dd2e2f /protocols/SkypeClassic/src/ng-compat | |
parent | 41ec75629ab19e84dd25a168797afe5fe8c01594 (diff) |
Updated SkypeClassic sources from leecher (compatible with IM, but broken with NG)
git-svn-id: http://svn.miranda-ng.org/main/trunk@10159 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeClassic/src/ng-compat')
-rw-r--r-- | protocols/SkypeClassic/src/ng-compat/m_core.h | 52 | ||||
-rw-r--r-- | protocols/SkypeClassic/src/ng-compat/stdver.h | 9 |
2 files changed, 61 insertions, 0 deletions
diff --git a/protocols/SkypeClassic/src/ng-compat/m_core.h b/protocols/SkypeClassic/src/ng-compat/m_core.h new file mode 100644 index 0000000000..9777eeb479 --- /dev/null +++ b/protocols/SkypeClassic/src/ng-compat/m_core.h @@ -0,0 +1,52 @@ +#define IS_MIRANDAIM + +typedef HANDLE MCONTACT; + +#define db_get_ws DBGetContactSettingWString +#define db_free DBFreeVariant +#define db_get_b DBGetContactSettingByte +#define db_get_s DBGetContactSettingString +#define db_get_ts DBGetContactSettingTString +#define db_set_s DBWriteContactSettingString +#define db_set_b DBWriteContactSettingByte +#define db_get_w DBGetContactSettingWord +#define db_set_w DBWriteContactSettingWord +#define db_set_ts DBWriteContactSettingTString +#define db_get_dw DBGetContactSettingDword +#define db_set_dw DBWriteContactSettingDword +#define db_set_utf SkypeDBWriteContactSettingUTF8String +#define db_set_ws DBWriteContactSettingWString + + +#define Menu_AddContactMenuItem(mi) (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)mi) +#define Menu_AddMainMenuItem(mi) (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM, (WPARAM)NULL,(LPARAM)mi) + +#define db_find_first() (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0) +#define db_find_next(hContact) (HANDLE)CallService( MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0) +#define db_event_getContact(hContact) (HANDLE)CallService (MS_DB_EVENT_GETCONTACT, (WPARAM)hContact, 0) +#define db_event_delete(hContact,hEvent) CallService (MS_DB_EVENT_DELETE, (WPARAM)hContact, (LPARAM)hEvent) +#define db_event_first(hContact) (HANDLE)CallService(MS_DB_EVENT_FINDFIRST,(WPARAM)hContact,0) +#define db_event_get(hDbEvent,dbei) CallService(MS_DB_EVENT_GET,(WPARAM)hDbEvent,(LPARAM)dbei) +#define db_event_last(hContact) (HANDLE)CallService(MS_DB_EVENT_FINDLAST,(WPARAM)hContact,0) +#define db_event_add(hContact,dbei) (HANDLE)CallServiceSync(MS_DB_EVENT_ADD, (WPARAM)(HANDLE)hContact, (LPARAM)dbei) +#define db_event_firstUnread(hContact) (HANDLE)CallService(MS_DB_EVENT_FINDFIRSTUNREAD,(WPARAM)hContact,0) +#define db_event_markRead(hContact,hDbEvent) CallService(MS_DB_EVENT_MARKREAD,(WPARAM)hContact,(LPARAM)hDbEvent) +#define db_event_getBlobSize(hEvent) CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hEvent, 0) +#define db_mc_isSub(hContact) DBGetContactSettingByte(hContact, "MetaContacts", "IsSubcontact", 0) +#define db_event_next(hContact,hDbEvent) (HANDLE)CallService(MS_DB_EVENT_FINDNEXT,(WPARAM)hDbEvent,0) + +#define Thread_Push(a,b) CallService(MS_SYSTEM_THREAD_PUSH, a, b) +#define Thread_Pop() CallService(MS_SYSTEM_THREAD_POP, 0, 0); + +#define GetContactProto(hContact) (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0 ) + +#define Options_AddPage(h,odp) CallService(MS_OPT_ADDPAGE, h, (LPARAM)odp); +#define UserInfo_AddPage(h,odp) CallService(MS_USERINFO_ADDPAGE, h, (LPARAM)odp); + +#define _A2T(x) x +#define _T2A(x) x +#define SIZEOF(x) sizeof(x)/sizeof(x[0]) +#define GSMDF_TCHAR GCMDF_TCHAR + +// Write contact setting as UTF-8 for convenience, if possible. Older Miranda IM versions will store it as ANSI +INT_PTR SkypeDBWriteContactSettingUTF8String(HANDLE hContact,const char *szModule,const char *szSetting,const char *val); diff --git a/protocols/SkypeClassic/src/ng-compat/stdver.h b/protocols/SkypeClassic/src/ng-compat/stdver.h new file mode 100644 index 0000000000..4e233c2d6e --- /dev/null +++ b/protocols/SkypeClassic/src/ng-compat/stdver.h @@ -0,0 +1,9 @@ +#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM +#define __FILEVERSION_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM + +#define __STRINGIFY_IMPL(x) #x +#define __STRINGIFY(x) __STRINGIFY_IMPL(x) + +#define __VERSION_DWORD PLUGIN_MAKE_VERSION(__MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM) +#define __VERSION_STRING __STRINGIFY(__FILEVERSION_STRING) +#define __VERSION_STRING_DOTS __STRINGIFY(__FILEVERSION_DOTS) |