diff options
author | Robert Pösel <robyer@seznam.cz> | 2015-03-06 16:46:10 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2015-03-06 16:46:10 +0000 |
commit | 615a53f6195f25a3d1b517f10f8957d0f0583768 (patch) | |
tree | 4304cd2cf21ad431bc2029170ce50f7e41a1f038 /protocols/Steam/src/steam_proto.h | |
parent | 4d7709c7b8fc466d21158670bb94aaea23ecb2e5 (diff) |
Steam: Add support for setting Away and N/A (= snooze) statuses
This is pseudo support as on server it is determined by our idle time which is sent with poll request. That means we must wait up to 30 seconds to status being changed on server.
Also this change disables reporting real idle time.
git-svn-id: http://svn.miranda-ng.org/main/trunk@12352 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/steam_proto.h')
-rw-r--r-- | protocols/Steam/src/steam_proto.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h index e2a76fa44b..6ee5b79a8a 100644 --- a/protocols/Steam/src/steam_proto.h +++ b/protocols/Steam/src/steam_proto.h @@ -316,7 +316,20 @@ protected: static INT_PTR CALLBACK BlockListOptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); // helpers - inline int IdleSeconds() { return m_idleTS ? time(0) - m_idleTS : 0; } + inline int IdleSeconds() { + // Based on idle time we report Steam server will mark us as online/away/snooze + switch (this->m_iStatus) { + case ID_STATUS_AWAY: + return STEAM_API_IDLEOUT_AWAY; + case ID_STATUS_NA: + return STEAM_API_IDLEOUT_SNOOZE; + default: + return 0; + } + + // ... or we can report real idle info + // return m_idleTS ? time(0) - m_idleTS : 0; + } }; int OnReloadIcons(WPARAM wParam, LPARAM lParam); |