コード例 #1
0
ファイル: dropbox.cpp プロジェクト: gloria8023/miranda-ng
CDropbox::CDropbox() : transfers(1, HandleKeySortT)
{
	PROTOCOLDESCRIPTOR pd = { 0 };
	pd.cbSize = sizeof(pd);
	pd.szName = MODULE;
	pd.type = PROTOTYPE_VIRTUAL;
	Proto_RegisterModule(&pd);

	HookEvent(ME_PROTO_ACK, OnProtoAck);
	HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown);
	HookEventObj(ME_SYSTEM_MODULESLOADED, GlobalEvent<&CDropbox::OnModulesLoaded>, this);

	hFileSentEventHook = CreateHookableEvent(ME_DROPBOX_SENT);

	CreateServiceFunctionObj(MS_DROPBOX_SEND_FILE, GlobalService<&CDropbox::SendFileToDropbox>, this);

	CreateProtoServiceFunction(MODULE, PS_GETCAPS, ProtoGetCaps);
	CreateProtoServiceFunction(MODULE, PS_GETNAME, ProtoGetName);
	CreateProtoServiceFunction(MODULE, PS_LOADICON, ProtoLoadIcon);
	CreateProtoServiceFunctionObj(PS_GETSTATUS, GlobalService<&CDropbox::ProtoGetStatus>, this);
	CreateProtoServiceFunctionObj(PSS_FILE, GlobalService<&CDropbox::ProtoSendFile>, this);
	CreateProtoServiceFunctionObj(PSS_FILECANCEL, GlobalService<&CDropbox::ProtoCancelFile>, this);
	CreateProtoServiceFunctionObj(PSS_MESSAGE, GlobalService<&CDropbox::ProtoSendMessage>, this);
	CreateProtoServiceFunction(MODULE, PSR_MESSAGE, ProtoReceiveMessage);

	InitializeMenus();

	hFileProcess = hMessageProcess = 1;
}
コード例 #2
0
ファイル: main.cpp プロジェクト: Seldom/miranda-ng
extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&pluginInfo);

	HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);

	NETLIBUSER nlu = { 0 };
	nlu.cbSize = sizeof(nlu);
	nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE;
	nlu.ptszDescriptiveName = _T(MODULE);
	nlu.szSettingsModule = MODULE;
	hNetlib = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);

	PROTOCOLDESCRIPTOR pd = { 0 };
	pd.cbSize = sizeof(pd);
	pd.szName = MODULE;
	pd.type = PROTOTYPE_FILTER;
	Proto_RegisterModule(&pd);

	CreateProtoServiceFunction(MODULE, PSR_MESSAGE, FilterRecvMessage);
	/*CreateProtoServiceFunction(MODULE, PSR_AUTH, FilterRecvAuth);
	CreateProtoServiceFunction(MODULE, PSR_FILE, FilterRecvFile);
	CreateProtoServiceFunction(MODULE, PSR_URL, FilterRecvUrl);
	CreateProtoServiceFunction(MODULE, PSR_CONTACTS, FilterRecvUrl);
	CreateProtoServiceFunction(MODULE, PSR_AWAYMSG, FilterRecvUrl);*/
	

	return 0;
}
コード例 #3
0
ファイル: dropbox.cpp プロジェクト: martok/miranda-ng
CDropbox::CDropbox()
{
	PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
	pd.szName = MODULE;
	pd.type = PROTOTYPE_VIRTUAL;
	CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);

	HookEventObj(ME_PROTO_ACK, OnProtoAck, this);
	HookEventObj(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown, this);
	HookEventObj(ME_SYSTEM_MODULESLOADED, OnModulesLoaded, this);

	hFileSentEventHook = CreateHookableEvent(ME_DROPBOX_SENT);

	CreateServiceFunctionObj(MS_DROPBOX_SEND_FILE, SendFileToDropbox, this);

	CreateProtoServiceFunction(MODULE, PS_GETCAPS, ProtoGetCaps);
	CreateProtoServiceFunctionObj(PSS_FILEW, ProtoSendFile, this);
	CreateProtoServiceFunctionObj(PSS_MESSAGE, ProtoSendMessage, this);
	CreateProtoServiceFunctionObj(PSR_MESSAGE, ProtoReceiveMessage, this);

	InitializeIcons();
	InitializeMenus();

	commands["help"] = CDropbox::CommandHelp;
	commands["content"] = CDropbox::CommandContent;
	commands["share"] = CDropbox::CommandShare;
	commands["delete"] = CDropbox::CommandDelete;

	hFileProcess = hMessageProcess = 1;
	hDefaultContact = hTransferContact = 0;
}
コード例 #4
0
ファイル: Forex.cpp プロジェクト: wyrover/miranda-ng
EXTERN_C int __declspec(dllexport) Load(void)
{
	mir_getLP(&Global_pluginInfo);

	if (false == CModuleInfo::Verify())
		return 1;

	Quotes_IconsInit();
	Quotes_InitExtraIcons();

	PROTOCOLDESCRIPTOR pd = { 0 };
	pd.cbSize = PROTOCOLDESCRIPTOR_V3_SIZE;
	pd.szName = QUOTES_PROTOCOL_NAME;
	pd.type = PROTOTYPE_VIRTUAL;
	Proto_RegisterModule(&pd);

	CreateProtoServiceFunction(QUOTES_PROTOCOL_NAME, PS_GETSTATUS, QuoteProtoFunc_GetStatus);

	HookEvent(ME_SYSTEM_MODULESLOADED, QuotesEventFunc_OnModulesLoaded);
	HookEvent(ME_DB_CONTACT_DELETED, QuotesEventFunc_OnContactDeleted);
	HookEvent(ME_SYSTEM_PRESHUTDOWN, QuotesEventFunc_PreShutdown);
	HookEvent(ME_OPT_INITIALISE, QuotesEventFunc_OptInitialise);

	CreateServiceFunction(MS_QUOTES_EXPORT, Quotes_Export);
	CreateServiceFunction(MS_QUOTES_IMPORT, Quotes_Import);

	return 0;
}
コード例 #5
0
ファイル: main.cpp プロジェクト: kmdtukl/miranda-ng
void InitServices()
{
	CreateProtoServiceFunction(MODULENAME, PS_GETCAPS, GetCaps);
	CreateProtoServiceFunction(MODULENAME, PS_GETNAME, GetName);
	CreateProtoServiceFunction(MODULENAME, PS_LOADICON, BPLoadIcon);
	CreateProtoServiceFunction(MODULENAME, PS_SETSTATUS, SetStatus);
	CreateProtoServiceFunction(MODULENAME, PS_GETSTATUS, GetStatus);
	CreateProtoServiceFunction(MODULENAME, PS_BASICSEARCH, BasicSearch);
	CreateProtoServiceFunction(MODULENAME, PS_ADDTOLIST, AddToList);
	CreateProtoServiceFunction(MODULENAME, PSS_GETINFO, GetInfo);
}
コード例 #6
0
ファイル: dllmain.cpp プロジェクト: kmdtukl/miranda-ng
extern "C" __declspec(dllexport) int Load(void)
{
	DEBUGOUT_T("LOAD MIROTR");

	mir_getLP(&pluginInfo);
	mir_getCLI();

	InitIcons();

	OTRL_INIT;
	INITCOMMONCONTROLSEX icce = {0};
	icce.dwSize = sizeof(icce);
	icce.dwICC = ICC_LISTVIEW_CLASSES|ICC_PROGRESS_CLASS;
	InitCommonControlsEx(&icce);

	db_set_resident(MODULENAME, "TrustLevel");

	////////////////////////////////////////////////////////////////////////////
	// init plugin
	PROTOCOLDESCRIPTOR pd = { 0 };
	pd.cbSize = sizeof(pd);
	pd.szName = MODULENAME;
	pd.type = PROTOTYPE_ENCRYPTION;
	Proto_RegisterModule(&pd);

	// remove us as a filter to all contacts - fix filter type problem
	if(db_get_b(0, MODULENAME, "FilterOrderFix", 0) != 2) {
		for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
			Proto_RemoveFromContact(hContact, MODULENAME);
		db_set_b(0, MODULENAME, "FilterOrderFix", 2);
	}

	// create our services
	CreateProtoServiceFunction(MODULENAME, PSS_MESSAGE, SVC_OTRSendMessage);
	CreateProtoServiceFunction(MODULENAME, PSR_MESSAGE, SVC_OTRRecvMessage);

	// hook modules loaded for updater support
	HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);

	return 0;
}
コード例 #7
0
extern "C" int __declspec(dllexport) Load(void)
{
#ifdef _DEBUG
	_OutputDebugString(_T("Entering Load dll"));
#endif

	mir_getLP(&pluginInfo);
	mir_getCLI();

	hExceptionsMutex = CreateMutex(NULL, FALSE, _T("ExceptionsMutex"));

	LoadSettings();
	connExceptions = LoadSettingsConnections();

	PROTOCOLDESCRIPTOR pd = { 0 };
	pd.cbSize = sizeof(pd);
	pd.szName = PLUGINNAME;
	pd.type = PROTOTYPE_PROTOCOL;
	Proto_RegisterModule(&pd);

	//set all contacts to offline
	for (MCONTACT hContact = db_find_first(PLUGINNAME); hContact != NULL; hContact = db_find_next(hContact, PLUGINNAME))
		db_set_w(hContact, PLUGINNAME, "status", ID_STATUS_OFFLINE);

	CreateProtoServiceFunction(PLUGINNAME, PS_GETCAPS, GetCaps);
	CreateProtoServiceFunction(PLUGINNAME, PS_GETNAME, GetName);
	CreateProtoServiceFunction(PLUGINNAME, PS_LOADICON, TMLoadIcon);
	CreateProtoServiceFunction(PLUGINNAME, PS_SETSTATUS, SetStatus);
	CreateProtoServiceFunction(PLUGINNAME, PS_GETSTATUS, GetStatus);

	SkinAddNewSoundEx(PLUGINNAME_NEWSOUND, PLUGINNAME, LPGEN("New Connection Notification"));
	hOptInit = HookEvent(ME_OPT_INITIALISE, ConnectionNotifyOptInit);//register service to hook option call
	assert(hOptInit);
	hHookModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, modulesloaded);//hook event that all plugins are loaded
	assert(hHookModulesLoaded);
	hHookPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, preshutdown);
	return 0;
}
コード例 #8
0
ファイル: main.cpp プロジェクト: Seldom/miranda-ng
int OnModulesLoaded(WPARAM, LPARAM)
{
	g_hCommonScriptFolder = FoldersRegisterCustomPathT(MODULE, Translate("Common scripts folder"), COMMON_SCRIPTS_PATHT);

	HookEvent(ME_OPT_INITIALISE, CLuaOptions::OnOptionsInit);

	hRecvMessage = CreateHookableEvent(MODULE PSR_MESSAGE);
	CreateProtoServiceFunction(MODULE, PSR_MESSAGE, FilterRecvMessage);

	InitIcons();

	g_mLua = new CMLua();
	g_mLua->Load();

	return 0;
}
コード例 #9
0
ファイル: NewsAggregator.cpp プロジェクト: tweimer/miranda-ng
int CMPlugin::Load()
{
	// Add options hook
	HookEvent(ME_OPT_INITIALISE, OptInit);
	HookEvent(ME_SYSTEM_MODULESLOADED, NewsAggrInit);
	HookEvent(ME_SYSTEM_PRESHUTDOWN, NewsAggrPreShutdown);

	hUpdateMutex = CreateMutex(nullptr, FALSE, nullptr);

	CreateProtoServiceFunction(MODULENAME, PS_GETNAME, NewsAggrGetName);
	CreateProtoServiceFunction(MODULENAME, PS_GETCAPS, NewsAggrGetCaps);
	CreateProtoServiceFunction(MODULENAME, PS_SETSTATUS, NewsAggrSetStatus);
	CreateProtoServiceFunction(MODULENAME, PS_GETSTATUS, NewsAggrGetStatus);
	CreateProtoServiceFunction(MODULENAME, PS_LOADICON, NewsAggrLoadIcon);
	CreateProtoServiceFunction(MODULENAME, PSS_GETINFO, NewsAggrGetInfo);
	CreateProtoServiceFunction(MODULENAME, PS_GETAVATARINFO, NewsAggrGetAvatarInfo);
	CreateProtoServiceFunction(MODULENAME, PSR_MESSAGE, NewsAggrRecvMessage);

	CreateServiceFunction(MS_NEWSAGGREGATOR_CHECKALLFEEDS, CheckAllFeeds);
	CreateServiceFunction(MS_NEWSAGGREGATOR_ADDFEED, AddFeed);
	CreateServiceFunction(MS_NEWSAGGREGATOR_IMPORTFEEDS, ImportFeeds);
	CreateServiceFunction(MS_NEWSAGGREGATOR_EXPORTFEEDS, ExportFeeds);
	CreateServiceFunction(MS_NEWSAGGREGATOR_CHECKFEED, CheckFeed);
	CreateServiceFunction(MS_NEWSAGGREGATOR_CHANGEFEED, ChangeFeed);
	CreateServiceFunction(MS_NEWSAGGREGATOR_ENABLED, EnableDisable);

	HOTKEYDESC hkd = {};
	hkd.dwFlags = HKD_UNICODE;
	hkd.pszName = "NewsAggregator/CheckAllFeeds";
	hkd.szDescription.w = LPGENW("Check All Feeds");
	hkd.szSection.w = LPGENW("News Aggregator");
	hkd.pszService = MS_NEWSAGGREGATOR_CHECKALLFEEDS;
	hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL+HKCOMB_A, 'O') | HKF_MIRANDA_LOCAL;
	g_plugin.addHotkey(&hkd);

	InitIcons();

	return 0;
}
コード例 #10
0
ファイル: services.cpp プロジェクト: Robyer/miranda-plugins
void ModulesLoadedServices()
{
	// Now initialize things
	for(unsigned int i = 0; i < protos.count; i++) 
	{
		if (!(CallProtoService(protos.info[i].name, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND))
			continue;

		if (ProtoServiceExists(protos.info[i].name, PS_GETMYAWAYMSG))
			continue;

		protos.info[i].flags = CallProtoService(protos.info[i].name, PS_GETCAPS, PFLAGNUM_3, 0);

		if (protos.info[i].flags == 0)
			continue;

		// Is a valid proto
		protos.info[i].initialized = TRUE;
		protos.info[i].handleGetAwayMsg = (HANDLE) CreateProtoServiceFunction(protos.info[i].name, 
														PS_GETMYAWAYMSG, getAwayFuncs[i]);
	}
}
コード例 #11
0
ファイル: sametime.cpp プロジェクト: MrtsComputers/miranda-ng
void CreatePluginServices() {
	// protocol
	CreateProtoServiceFunction(PROTO, PS_GETCAPS, GetCaps);
	CreateProtoServiceFunction(PROTO, PS_GETNAME, GetName);
	CreateProtoServiceFunction(PROTO, PS_SETSTATUS, SetStatus);
	CreateProtoServiceFunction(PROTO, PS_GETSTATUS, GetStatus);
	CreateProtoServiceFunction(PROTO, PS_LOADICON,LoadIcon);
	CreateProtoServiceFunction(PROTO, PSS_GETINFO,GetInfo);

	CreateProtoServiceFunction(PROTO, PS_BASICSEARCH,BasicSearch);
	CreateProtoServiceFunction(PROTO, PS_ADDTOLIST,AddToList);

	CreateProtoServiceFunction(PROTO, PSR_MESSAGE, RecvMessage);

	CreateProtoServiceFunction(PROTO, PSS_MESSAGE, STSendMessage);
	CreateProtoServiceFunction(PROTO, PSS_MESSAGE"W", STSendMessageW);

	CreateProtoServiceFunction(PROTO, PS_SETAWAYMSG,SetAwayMessage);
	CreateProtoServiceFunction(PROTO, PSS_GETAWAYMSG,GetAwayMessage);
	CreateProtoServiceFunction(PROTO, PSR_AWAYMSG,RecvAwayMessage);

	CreateProtoServiceFunction(PROTO, PSS_USERISTYPING, SendTyping);

	CreateProtoServiceFunction(PROTO, PSR_FILE, RecvFile);
	CreateProtoServiceFunction(PROTO, PSS_FILEALLOW, AllowFile);
	CreateProtoServiceFunction(PROTO, PSS_FILEDENY, DenyFile);
	CreateProtoServiceFunction(PROTO, PSS_FILE, SendFiles);

	CreateProtoServiceFunction(PROTO, PSS_FILECANCEL, CancelFile);

	CreateProtoServiceFunction(PROTO, PS_CREATEADVSEARCHUI, CreateSearchDialog);
	CreateProtoServiceFunction(PROTO, PS_SEARCHBYADVANCED, SearchFromDialog);
}
コード例 #12
0
void Meta_InitServices()
{
	previousMode = mcStatus = ID_STATUS_OFFLINE;

	CreateServiceFunction("MetaContacts/Convert", Meta_Convert);
	CreateServiceFunction("MetaContacts/AddTo", Meta_AddTo);
	CreateServiceFunction("MetaContacts/Edit", Meta_Edit);
	CreateServiceFunction("MetaContacts/Delete", Meta_Delete);
	CreateServiceFunction("MetaContacts/Default", Meta_Default);

	// hidden contact menu items...ho hum
	for (int i = 0; i < MAX_CONTACTS; i++) {
		char szServiceName[100];
		mir_snprintf(szServiceName, SIZEOF(szServiceName), "MetaContacts/MenuFunc%d", i);
		CreateServiceFunctionParam(szServiceName, MenuFunc, i);
	}

	CreateProtoServiceFunction(META_PROTO, PS_GETCAPS, Meta_GetCaps);
	CreateProtoServiceFunction(META_PROTO, PS_GETNAME, Meta_GetName);
	CreateProtoServiceFunction(META_PROTO, PS_LOADICON, Meta_LoadIcon);

	CreateProtoServiceFunction(META_PROTO, PS_SETSTATUS, Meta_SetStatus);

	CreateProtoServiceFunction(META_PROTO, PS_GETSTATUS, Meta_GetStatus);
	CreateProtoServiceFunction(META_PROTO, PSS_MESSAGE, Meta_SendMessage);

	CreateProtoServiceFunction(META_PROTO, PSS_USERISTYPING, Meta_UserIsTyping);

	// file recv is done by subcontacts
	CreateProtoServiceFunction(META_PROTO, PSS_FILE, Meta_FileSend);
	CreateProtoServiceFunction(META_PROTO, PSS_GETAWAYMSG, Meta_GetAwayMsg);
	CreateProtoServiceFunction(META_PROTO, PS_GETAVATARINFOT, Meta_GetAvatarInfo);
	CreateProtoServiceFunction(META_PROTO, PSS_GETINFO, Meta_GetInfo);

	// receive filter
	CreateProtoServiceFunction(META_FILTER, PSR_MESSAGE, MetaFilter_RecvMessage);

	// API services and events
	CreateApiServices();

	CreateServiceFunction("MetaContacts/OnOff", Meta_OnOff);
	CreateServiceFunction(MS_MC_GETSRMMSUB, Meta_SrmmCurrentSub);

	CreateProtoServiceFunction(META_PROTO, PS_SEND_NUDGE, Meta_SendNudge);

	// create our hookable events
	hSubcontactsChanged = CreateHookableEvent(ME_MC_SUBCONTACTSCHANGED);

	// hook other module events we need
	HookEvent(ME_PROTO_ACK, Meta_HandleACK);
	HookEvent(ME_DB_CONTACT_DELETED, Meta_ContactDeleted);
	HookEvent(ME_DB_CONTACT_SETTINGCHANGED, Meta_SettingChanged);
	HookEvent(ME_OPT_INITIALISE, Meta_OptInit);
	HookEvent(ME_SYSTEM_MODULESLOADED, Meta_ModulesLoaded);
	HookEvent(ME_SYSTEM_PRESHUTDOWN, Meta_PreShutdown);

	// hook our own events, used to call Meta_GetMostOnline which sets nick for metacontact
	HookEvent(ME_MC_DEFAULTTCHANGED, Meta_CallMostOnline);

	// redirect nudge events
	hEventNudge = CreateHookableEvent(META_PROTO "/Nudge");
}
コード例 #13
0
ファイル: main.cpp プロジェクト: kxepal/miranda-ng
extern "C" int __declspec(dllexport) Load()
{
	mir_getLP(&pluginInfoEx);
	mir_getCLI();

	SkinAddNewSoundEx("Gmail", LPGEN("Other"), LPGEN("Gmail: New thread(s)"));
	HookEvent(ME_CLIST_DOUBLECLICKED, OpenBrowser);

	PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
	pd.szName = MODULE_NAME;
	pd.type = PROTOTYPE_VIRTUAL;
	Proto_RegisterModule(&pd);

	CreateProtoServiceFunction(MODULE_NAME, PS_GETCAPS, GetCaps);
	CreateProtoServiceFunction(MODULE_NAME, PS_GETSTATUS, GetStatus);
	CreateProtoServiceFunction(MODULE_NAME, PS_GETNAME, GetName);
	CreateServiceFunction("GmailMNotifier/Notifying", Notifying);

	opt.circleTime = db_get_dw(NULL, MODULE_NAME, "circleTime", 30);
	opt.notifierOnTray = db_get_dw(NULL, MODULE_NAME, "notifierOnTray", TRUE);
	opt.notifierOnPop = db_get_dw(NULL, MODULE_NAME, "notifierOnPop", TRUE);
	opt.popupDuration = db_get_dw(NULL, MODULE_NAME, "popupDuration", -1);
	opt.popupBgColor = db_get_dw(NULL, MODULE_NAME, "popupBgColor", RGB(173, 206, 247));
	opt.popupTxtColor = db_get_dw(NULL, MODULE_NAME, "popupTxtColor", RGB(0, 0, 0));
	opt.OpenUsePrg = db_get_dw(NULL, MODULE_NAME, "OpenUsePrg", 0);
	opt.ShowCustomIcon = db_get_dw(NULL, MODULE_NAME, "ShowCustomIcon", FALSE);
	opt.UseOnline = db_get_dw(NULL, MODULE_NAME, "UseOnline", FALSE);
	opt.AutoLogin = db_get_dw(NULL, MODULE_NAME, "AutoLogin", TRUE);
	opt.LogThreads = db_get_dw(NULL, MODULE_NAME, "LogThreads", FALSE);

	DBVARIANT dbv;
	if (db_get_s(NULL, "Icons", "GmailMNotifier40076", &dbv)) {
		db_set_s(NULL, "Icons", "GmailMNotifier40071", "plugins\\gmailm.dll,2");
		db_set_s(NULL, "Icons", "GmailMNotifier40072", "plugins\\gmailm.dll,2");
		db_set_s(NULL, "Icons", "GmailMNotifier40076", "plugins\\gmailm.dll,0");
		db_set_s(NULL, "Icons", "GmailMNotifier40073", "plugins\\gmailm.dll,1");
	}
	else db_free(&dbv);

	BuildList();
	ID_STATUS_NONEW = opt.UseOnline ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE;
	for (int i = 0; i < acc_num; i++)
		db_set_dw(acc[i].hContact, MODULE_NAME, "Status", ID_STATUS_NONEW);

	hTimer = SetTimer(NULL, 0, opt.circleTime * 60000, TimerProc);
	hMirandaStarted = HookEvent(ME_SYSTEM_MODULESLOADED, OnMirandaStart);
	hOptionsInitial = HookEvent(ME_OPT_INITIALISE, OptInit);
	
	CreateServiceFunction(MODULE_NAME "/MenuCommand", PluginMenuCommand);

	CMenuItem mi;
	SET_UID(mi, 0xbe16f37, 0x17be, 0x4494, 0xaa, 0xb2, 0x3a, 0xa7, 0x38, 0xfa, 0xf9, 0xcc);
	mi.position = -0x7FFFFFFF;
	mi.hIcolibItem = Skin_LoadProtoIcon(MODULE_NAME, ID_STATUS_ONLINE);
	mi.name.a = LPGEN("&Check all Gmail inboxes");
	mi.pszService = MODULE_NAME "/MenuCommand";
	Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0x22c6ace1, 0xba0c, 0x44b5, 0xa4, 0xd2, 0x1, 0x7d, 0xb1, 0xe0, 0x51, 0xeb);
	mi.name.a = LPGEN("&Check Gmail inbox");
	mi.pszService = "/MenuCommand";
	Menu_AddContactMenuItem(&mi, MODULE_NAME);
	return 0;
}
コード例 #14
0
ファイル: amdproto.cpp プロジェクト: Seldom/miranda-ng
extern "C" int __declspec(dllexport) __cdecl Load()
{
	mir_getLP(&pluginInfo);
	g_lan = new CMLan();

	PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
	pd.szName = PROTONAME;
	pd.type = PROTOTYPE_PROTOCOL;
	Proto_RegisterModule(&pd);

	CreateProtoServiceFunction(PROTONAME, PS_GETCAPS, EMPGetCaps);
	CreateProtoServiceFunction(PROTONAME, PS_GETNAME, EMPGetName);
	CreateProtoServiceFunction(PROTONAME, PS_LOADICON, EMPLoadIcon);
	CreateProtoServiceFunction(PROTONAME, PS_SETSTATUS, EMPSetStatus);
	CreateProtoServiceFunction(PROTONAME, PS_GETSTATUS, EMPGetStatus);
	CreateProtoServiceFunction(PROTONAME, PS_BASICSEARCH, EMPBasicSearch);
	CreateProtoServiceFunction(PROTONAME, PS_ADDTOLIST, EMPAddToList);
	CreateProtoServiceFunction(PROTONAME, PSS_MESSAGE, EMPSendMessage);
	CreateProtoServiceFunction(PROTONAME, PSS_URL, EMPSendUrl);
	CreateProtoServiceFunction(PROTONAME, PSR_MESSAGE, EMPRecvMessageUrl);
	CreateProtoServiceFunction(PROTONAME, PSR_URL, EMPRecvMessageUrl);
	CreateProtoServiceFunction(PROTONAME, PSS_GETAWAYMSG, EMPGetAwayMsg);
	CreateProtoServiceFunction(PROTONAME, PS_SETAWAYMSG, EMPSetAwayMsg);
	CreateProtoServiceFunction(PROTONAME, PSR_AWAYMSG, EMPRecvAwayMessage);
	CreateProtoServiceFunction(PROTONAME, PS_FILERESUME, EMPFileResume);
	CreateProtoServiceFunction(PROTONAME, PSS_FILEALLOW, EMPSendFileAllow);
	CreateProtoServiceFunction(PROTONAME, PSS_FILEDENY, EMPSendFileDeny);
	CreateProtoServiceFunction(PROTONAME, PSS_FILECANCEL, EMPSendFileCancel);
	CreateProtoServiceFunction(PROTONAME, PSS_FILE, EMPSendFile);
	CreateProtoServiceFunction(PROTONAME, PSR_FILE, EMPRecvFile);

	HookEvent(ME_OPT_INITIALISE, EMPCreateOptionsDlg);
	return 0;
}
コード例 #15
0
ファイル: services.cpp プロジェクト: Seldom/miranda-ng
int LoadServices()
{
    if (!icq.load()) return 1;

    HookEvent(ME_DB_CONTACT_DELETED, icqContactDeleted);
    HookEvent(ME_OPT_INITIALISE, icqOptionsInitialise);
    HookEvent(ME_SYSTEM_MODULESLOADED, icqModulesLoaded);

    CreateProtoServiceFunction(protoName, PS_GETCAPS, icqGetCaps);
    CreateProtoServiceFunction(protoName, PS_GETNAME, icqGetName);
    CreateProtoServiceFunction(protoName, PS_LOADICON, icqLoadIcon);
    CreateProtoServiceFunction(protoName, PS_SETSTATUS, icqSetStatus);
    CreateProtoServiceFunction(protoName, PS_GETSTATUS, icqGetStatus);
    CreateProtoServiceFunction(protoName, PS_SETAWAYMSG, icqSetAwayMsg);
    CreateProtoServiceFunction(protoName, PS_AUTHALLOW, icqAuthAllow);
    CreateProtoServiceFunction(protoName, PS_AUTHDENY, icqAuthDeny);
    CreateProtoServiceFunction(protoName, PS_BASICSEARCH, icqBasicSearch);
    CreateProtoServiceFunction(protoName, PS_SEARCHBYEMAIL, icqSearchByEmail);
    CreateProtoServiceFunction(protoName, PS_SEARCHBYNAME, icqSearchByName);
    CreateProtoServiceFunction(protoName, PS_ADDTOLIST, icqAddToList);
    CreateProtoServiceFunction(protoName, PS_FILERESUME, icqFileResume);

    CreateProtoServiceFunction(protoName, PSS_GETINFO, icqGetInfo);
    CreateProtoServiceFunction(protoName, PSS_MESSAGE, icqSendMessage);
    CreateProtoServiceFunction(protoName, PSS_URL, icqSendUrl);
    CreateProtoServiceFunction(protoName, PSS_GETAWAYMSG, icqGetAwayMsg);
    CreateProtoServiceFunction(protoName, PSS_FILE, icqSendFile);
    CreateProtoServiceFunction(protoName, PSS_FILEALLOW, icqFileAllow);
    CreateProtoServiceFunction(protoName, PSS_FILEDENY, icqFileDeny);
    CreateProtoServiceFunction(protoName, PSS_FILECANCEL, icqFileCancel);
    CreateProtoServiceFunction(protoName, PSS_SETAPPARENTMODE, icqSetApparentMode);

    CreateProtoServiceFunction(protoName, PSR_MESSAGE, icqRecvMessage);
    CreateProtoServiceFunction(protoName, PSR_URL, icqRecvUrl);
    CreateProtoServiceFunction(protoName, PSR_AWAYMSG, icqRecvAwayMsg);
    CreateProtoServiceFunction(protoName, PSR_FILE, icqRecvFile);
    return 0;
}
コード例 #16
0
ファイル: weather_svcs.cpp プロジェクト: 0xmono/miranda-ng
//============  PROTOCOL INITIALIZATION  ============
// protocol services
void InitServices(void)
{
	CreateProtoServiceFunction(WEATHERPROTONAME, PS_GETCAPS, WeatherGetCaps);
	CreateProtoServiceFunction(WEATHERPROTONAME, PS_GETNAME, WeatherGetName);
	CreateProtoServiceFunction(WEATHERPROTONAME, PS_LOADICON, WeatherLoadIcon);
	CreateProtoServiceFunction(WEATHERPROTONAME, PS_SETSTATUS, WeatherSetStatus);
	CreateProtoServiceFunction(WEATHERPROTONAME, PS_GETSTATUS, WeatherGetStatus);
	CreateProtoServiceFunction(WEATHERPROTONAME, PS_BASICSEARCHT, WeatherBasicSearch);
	CreateProtoServiceFunction(WEATHERPROTONAME, PS_SEARCHBYEMAILT, WeatherBasicSearch);
	CreateProtoServiceFunction(WEATHERPROTONAME, PS_ADDTOLIST, WeatherAddToList);
	CreateProtoServiceFunction(WEATHERPROTONAME, PSS_GETINFO, WeatherGetInfo);
	CreateProtoServiceFunction(WEATHERPROTONAME, PS_GETAVATARINFOT, WeatherGetAvatarInfo);
	CreateProtoServiceFunction(WEATHERPROTONAME, PSS_GETAWAYMSG, WeatherGetAwayMsg);
	CreateProtoServiceFunction(WEATHERPROTONAME, PS_CREATEADVSEARCHUI, WeatherCreateAdvancedSearchUI);
	CreateProtoServiceFunction(WEATHERPROTONAME, PS_SEARCHBYADVANCED, WeatherAdvancedSearch);

	CreateProtoServiceFunction(WEATHERPROTONAME, MS_WEATHER_GETDISPLAY, GetDisplaySvcFunc);
}
コード例 #17
0
ファイル: main.cpp プロジェクト: aventado/secureimplugin
void AddProtoServiceFunction(LPCSTR serviceName, MIRANDASERVICE serviceFunction) {
	
	g_hService = (HANDLE*) mir_realloc(g_hService,sizeof(HANDLE)*(iService+1));
 	g_hService[iService] = CreateProtoServiceFunction(szModuleName, serviceName, serviceFunction);
	iService++;
}