From 061cf8a12c07aecc4526840a59ba0135f43b2fca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Tue, 9 Dec 2014 17:08:19 +0000 Subject: Steam: Use XStatus for info about playing game (part 1) git-svn-id: http://svn.miranda-ng.org/main/trunk@11300 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Steam/src/steam_proto.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'protocols/Steam/src/steam_proto.cpp') diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index f9ef530e79..bd255c5e10 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -34,13 +34,20 @@ CSteamProto::CSteamProto(const char* protoName, const TCHAR* userName) : sid.iDefaultIndex = -IDI_STEAM; Skin_AddIcon(&sid); + mir_snprintf(settingName, SIZEOF(settingName), "%s_%s", MODULE, "gaming"); + sid.ptszDescription = LPGENT("Gaming icon"); + sid.iDefaultIndex = -IDI_GAMING; + Skin_AddIcon(&sid); + // temporary DB settings - db_set_resident(m_szModuleName, "Status"); // NOTE: XStatus cannot be temporary + db_set_resident(m_szModuleName, "Status"); + db_set_resident(m_szModuleName, "XStatusId"); + db_set_resident(m_szModuleName, "XStatusName"); + db_set_resident(m_szModuleName, "XStatusMsg"); db_set_resident(m_szModuleName, "IdleTS"); db_set_resident(m_szModuleName, "GameID"); - db_set_resident(m_szModuleName, "GameInfo"); - db_set_resident(m_szModuleName, "GameServerIP"); - db_set_resident(m_szModuleName, "GameServerID"); + db_set_resident(m_szModuleName, "ServerIP"); + db_set_resident(m_szModuleName, "ServerID"); SetAllContactsStatus(ID_STATUS_OFFLINE); @@ -50,6 +57,10 @@ CSteamProto::CSteamProto(const char* protoName, const TCHAR* userName) : CreateProtoService(PS_GETAVATARINFOT, &CSteamProto::GetAvatarInfo); CreateProtoService(PS_GETAVATARCAPS, &CSteamProto::GetAvatarCaps); CreateProtoService(PS_GETMYAVATART, &CSteamProto::GetMyAvatar); + // custom status API + CreateProtoService(PS_GETCUSTOMSTATUSEX, &CSteamProto::GetXStatusEx); + CreateProtoService(PS_GETCUSTOMSTATUSICON, &CSteamProto::GetXStatusIcon); + CreateProtoService(PS_GETADVANCEDSTATUSICON, &CSteamProto::RequestAdvStatusIconIdx); } CSteamProto::~CSteamProto() -- cgit v1.2.3