From 5d2487dc97a63b0545b2d7d56405e7417fa2dd75 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Wed, 9 Apr 2014 12:06:39 +0000 Subject: Steam: - add searching by name - added contact info updating - small improvements git-svn-id: http://svn.miranda-ng.org/main/trunk@8901 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Steam/src/steam_proto.h | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'protocols/Steam/src/steam_proto.h') diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h index 28ef2f853a..1e2bcdd6a6 100644 --- a/protocols/Steam/src/steam_proto.h +++ b/protocols/Steam/src/steam_proto.h @@ -24,6 +24,13 @@ struct SendMessageParam const char *text; }; +struct STEAM_SEARCH_RESULT +{ + PROTOSEARCHRESULT hdr; + const SteamWebApi::FriendApi::Summary *contact; +}; + + class CSteamProto : public PROTO { public: @@ -97,9 +104,6 @@ protected: void __cdecl PollingThread(void*); // account - static WORD SteamToMirandaStatus(int state); - static int MirandaToSteamState(int status); - bool IsOnline(); bool IsMe(const char *steamId); void Authorize(SteamWebApi::AuthorizationApi::AuthResult *authResult); @@ -111,10 +115,14 @@ protected: void SetContactStatus(MCONTACT hContact, WORD status); void SetAllContactsStatus(WORD status); - MCONTACT FindContact(const char *steamId); - MCONTACT AddContact(const SteamWebApi::FriendApi::Friend &contact); + void UpdateContact(MCONTACT hContact, const SteamWebApi::FriendApi::Summary *contact); + void __cdecl UpdateContactsThread(void*); + MCONTACT FindContact(const char *steamId); + MCONTACT AddContact(const SteamWebApi::FriendApi::Summary *contact); + void __cdecl SearchByIdThread(void*); + void __cdecl SearchByNameThread(void*); // messages void __cdecl SendMessageThread(void*); @@ -126,7 +134,13 @@ protected: INT_PTR __cdecl OnAccountManagerInit(WPARAM wParam, LPARAM lParam); static int __cdecl OnOptionsInit(void *obj, WPARAM wParam, LPARAM lParam); - //options + // utils + static WORD SteamToMirandaStatus(int state); + static int MirandaToSteamState(int status); + + static int RsaEncrypt(const SteamWebApi::RsaKeyApi::RsaKey &rsaKey, const char *data, DWORD dataSize, BYTE *encrypted, DWORD &encryptedSize); + + // options static INT_PTR CALLBACK GuardProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); static INT_PTR CALLBACK CaptchaProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); static INT_PTR CALLBACK MainOptionsProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); -- cgit v1.2.3