diff options
Diffstat (limited to 'protocols/Steam/src')
| -rw-r--r-- | protocols/Steam/src/steam_menus.cpp | 23 | ||||
| -rw-r--r-- | protocols/Steam/src/steam_proto.cpp | 4 | ||||
| -rw-r--r-- | protocols/Steam/src/steam_proto.h | 24 | 
3 files changed, 16 insertions, 35 deletions
diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp index 2387f19f9d..5e0941a713 100644 --- a/protocols/Steam/src/steam_menus.cpp +++ b/protocols/Steam/src/steam_menus.cpp @@ -13,7 +13,6 @@ INT_PTR GlobalService(WPARAM wParam, LPARAM lParam)  int CSteamProto::AuthRequestCommand(WPARAM hContact, LPARAM)
  {
  	ProtoChainSend(hContact, PSS_AUTHREQUEST, 0, 0);
 -
  	return 0;
  }
 @@ -94,8 +93,8 @@ int CSteamProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)  	bool ctrlPressed = (GetKeyState(VK_CONTROL) & 0x8000) != 0;
  	bool authNeeded = getBool(hContact, "Auth", 0);
 -	Menu_ShowItem(contactMenuItems[CMI_AUTH_REQUEST], authNeeded || ctrlPressed);
 -	Menu_ShowItem(contactMenuItems[CMI_AUTH_REVOKE], !authNeeded || ctrlPressed);
 +	Menu_ShowItem(m_hmiReqAuth, authNeeded || ctrlPressed);
 +	Menu_ShowItem(m_hmiRevokeAuth, !authNeeded || ctrlPressed);
  	bool isBlocked = getBool(hContact, "Block", 0);
  	Menu_ShowItem(contactMenuItems[CMI_BLOCK], !isBlocked || ctrlPressed);
 @@ -139,24 +138,6 @@ void CSteamProto::InitMenus()  	CMenuItem mi;
  	mi.flags = CMIF_UNICODE;
 -	// "Request authorization"
 -	SET_UID(mi, 0x36375a1f, 0xc142, 0x4d6e, 0xa6, 0x57, 0xe4, 0x76, 0x5d, 0xbc, 0x59, 0x8e);
 -	mi.pszService = MODULE "/AuthRequest";
 -	mi.name.w = LPGENW("Request authorization");
 -	mi.position = -201001000 + CMI_AUTH_REQUEST;
 -	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
 -	contactMenuItems[CMI_AUTH_REQUEST] = Menu_AddContactMenuItem(&mi);
 -	CreateServiceFunction(mi.pszService, GlobalService<&CSteamProto::AuthRequestCommand>);
 -
 -	// "Revoke authorization"
 -	SET_UID(mi, 0x619efdcb, 0x99c0, 0x44a8, 0xbf, 0x28, 0xc3, 0xe0, 0x2f, 0xb3, 0x7e, 0x77);
 -	mi.pszService = MODULE "/RevokeAuth";
 -	mi.name.w = LPGENW("Revoke authorization");
 -	mi.position = -201001001 + CMI_AUTH_REVOKE;
 -	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_AUTH_REVOKE);
 -	contactMenuItems[CMI_AUTH_REVOKE] = Menu_AddContactMenuItem(&mi);
 -	CreateServiceFunction(mi.pszService, GlobalService<&CSteamProto::AuthRevokeCommand>);
 -
  	// "Block"
  	SET_UID(mi, 0xc6169b8f, 0x53ab, 0x4242, 0xbe, 0x90, 0xe2, 0x4a, 0xa5, 0x73, 0x88, 0x32);
  	mi.pszService = MODULE "/Block";
 diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index 586565c8cb..2a3b1dd732 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -63,6 +63,10 @@ CSteamProto::CSteamProto(const char* protoName, const wchar_t* userName)  	CreateProtoService(PS_GETCUSTOMSTATUSICON, &CSteamProto::OnGetXStatusIcon);  	CreateProtoService(PS_GETADVANCEDSTATUSICON, &CSteamProto::OnRequestAdvStatusIconIdx); +	// menus +	CreateProtoService(PS_MENU_REQAUTH, &CSteamProto::AuthRequestCommand); +	CreateProtoService(PS_MENU_REVOKEAUTH, &CSteamProto::AuthRevokeCommand); +  	// custom db events API  	CreateProtoService(STEAM_DB_GETEVENTTEXT_CHATSTATES, &CSteamProto::OnGetEventTextChatStates); diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h index 2478eb3223..d37f35b071 100644 --- a/protocols/Steam/src/steam_proto.h +++ b/protocols/Steam/src/steam_proto.h @@ -19,13 +19,9 @@ struct STEAM_SEARCH_RESULT  enum
  {
 -	CMI_AUTH_REQUEST,
 -	//CMI_AUTH_GRANT,
 -	CMI_AUTH_REVOKE,
  	CMI_BLOCK,
  	CMI_UNBLOCK,
  	CMI_JOIN_GAME,
 -	//SMI_BLOCKED_LIST,
  	CMI_MAX   // this item shall be the last one
  };
 @@ -59,25 +55,25 @@ public:  	~CSteamProto();
  	// PROTO_INTERFACE
 -	virtual	MCONTACT  __cdecl AddToList(int flags, PROTOSEARCHRESULT *psr);
 +	virtual MCONTACT  __cdecl AddToList(int flags, PROTOSEARCHRESULT *psr);
 -	virtual	int       __cdecl Authorize(MEVENT hDbEvent);
 +	virtual int       __cdecl Authorize(MEVENT hDbEvent);
  	virtual int       __cdecl AuthRecv(MCONTACT, PROTORECVEVENT*);
 -	virtual	int       __cdecl AuthDeny(MEVENT hDbEvent, const wchar_t *szReason);
 -	virtual	int       __cdecl AuthRequest(MCONTACT hContact, const wchar_t *szMessage);
 +	virtual int       __cdecl AuthDeny(MEVENT hDbEvent, const wchar_t *szReason);
 +	virtual int       __cdecl AuthRequest(MCONTACT hContact, const wchar_t *szMessage);
 -	virtual	DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
 +	virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
 -	virtual	HANDLE    __cdecl SearchBasic(const wchar_t *id);
 +	virtual HANDLE    __cdecl SearchBasic(const wchar_t *id);
  	virtual HANDLE    __cdecl SearchByName(const wchar_t *nick, const wchar_t *firstName, const wchar_t *lastName);
 -	virtual	int       __cdecl SendMsg(MCONTACT hContact, int flags, const char *msg);
 +	virtual int       __cdecl SendMsg(MCONTACT hContact, int flags, const char *msg);
 -	virtual	int       __cdecl SetStatus(int iNewStatus);
 +	virtual int       __cdecl SetStatus(int iNewStatus);
 -	virtual	int       __cdecl UserIsTyping(MCONTACT hContact, int type);
 +	virtual int       __cdecl UserIsTyping(MCONTACT hContact, int type);
 -	virtual	int       __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
 +	virtual int       __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
  	// instances
  	static CSteamProto* InitAccount(const char* protoName, const wchar_t *userName);
  | 
