From de6eb3e4bc30eff928dc932c03812ede3077926a Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 13 Oct 2012 08:54:34 +0000 Subject: MRA: folders restructurization git-svn-id: http://svn.miranda-ng.org/main/trunk@1900 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MRA/src/Mra.h | 265 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 protocols/MRA/src/Mra.h (limited to 'protocols/MRA/src/Mra.h') diff --git a/protocols/MRA/src/Mra.h b/protocols/MRA/src/Mra.h new file mode 100644 index 0000000000..7c6faac372 --- /dev/null +++ b/protocols/MRA/src/Mra.h @@ -0,0 +1,265 @@ +#if !defined(AFX_MRA_H__F58D13FF_F6F2_476C_B8F0_7B9E9357CF48__INCLUDED_) +#define AFX_MRA_H__F58D13FF_F6F2_476C_B8F0_7B9E9357CF48__INCLUDED_ + + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define _CRT_SECURE_NO_WARNINGS + +#pragma warning(disable:4267) + +//#define CRTDLL + +#include "resource.h" +#include "..\xstatus_MRA\src\resource.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define bzero(pvDst, count) memset(pvDst, 0, count) +#include + +#include "../../plugins/zlib/zlib.h" + +#define MIRANDA_VER 0x0A00 + +// http://miranda.svn.sourceforge.net/viewvc/miranda/trunk/miranda/include/?sortby = file +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +// LPS +typedef struct +{ + size_t dwSize; + + union { + LPSTR lpszData; + LPWSTR lpwszData; + }; +} MRA_LPS; + + +// GUID +typedef struct +{ + DWORD id[4]; +} MRA_GUID; + + + +struct MRA_ADDR_LIST_ITEM +{ + DWORD dwPort; + DWORD dwAddr; +}; + +struct MRA_ADDR_LIST +{ + DWORD dwAddrCount; + MRA_ADDR_LIST_ITEM *pmaliAddress; +}; + +#include "MraConstans.h" +#include "MraProto.h" + +// структура содержащая информацию по построению меню или расширеных иконок +struct GUI_DISPLAY_ITEM +{ + LPSTR lpszName; // имя сервиса, оно же имя в иколибе + LPWSTR lpwszDescr; // текстовое описание отображаемое юзеру + LONG defIcon; // иконка из ресурсов + ServiceFunc lpFunc; // функция вызываемая меню + HANDLE hIconHandle; +}; + +// структура содержащая информацию о сервисах/функциях +struct SERVICE_ITEM +{ + LPSTR lpszName; // имя сервиса, оно же имя в иколибе + ServiceFunc lpFunc; // функция вызываемая +}; + +extern GUI_DISPLAY_ITEM gdiMenuItems[]; +extern GUI_DISPLAY_ITEM gdiContactMenuItems[]; +extern GUI_DISPLAY_ITEM gdiExtraStatusIconsItems[]; + +#include "proto.h" +#include "MraSendCommand.h" +#include "MraMRIMProxy.h" +#include "MraSendQueue.h" +#include "MraFilesQueue.h" +#include "MraPopUp.h" +#include "MraAvatars.h" +#include "MraIcons.h" +#include "MraSelectEMail.h" +#include "MraAntiSpam.h" +#include "MraMPop.h" +#include "MraChat.h" + + +#ifdef MRA_EXPORTS + #define MRA_API __declspec(dllexport) +#else + #define MRA_API + // __declspec(dllimport) + #pragma comment(lib, "MRALib.lib") +#endif + +///////////////////////////////////////////////////////////////////////////////////////// +// plugin options + +typedef struct +{ + HANDLE hHeap; + HINSTANCE hInstance; + HMODULE hDLLXStatusIcons; + + DWORD dwGlobalPluginRunning; + BOOL bChatExist; + + size_t dwMirWorkDirPathLen; + WCHAR szMirWorkDirPath[MAX_FILEPATH]; +} MRA_SETTINGS; + + +///////////////////////////////////////////////////////////////////////////////////////// +// External variables +extern MRA_SETTINGS masMraSettings; +extern LIST g_Instances; + +INT_PTR LoadModules(); +void UnloadModules(); +void InitExtraIcons(); + +DWORD MraGetSelfVersionString(LPSTR lpszSelfVersion, size_t dwSelfVersionSize, size_t *pdwSelfVersionSizeRet); + +#define GetContactNameA(Contact) (LPSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)Contact, 0) +#define GetContactNameW(Contact) (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)Contact, GCDNF_UNICODE) + +#define GetStatusModeDescriptionA(Status) (LPSTR)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)Status, 0) +#define GetStatusModeDescriptionW(Status) (LPWSTR)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)Status, GSMDF_UNICODE) + +#define SetBit(bytes, bitpos) bytes |= (1<