summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_utils.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-12-08 23:53:49 +0000
committerRobert Pösel <robyer@seznam.cz>2014-12-08 23:53:49 +0000
commit97d772455be44b3693678bb5192e5c6bc777bc98 (patch)
tree3729e0320c19d4a6d888d2003119e707d27104d1 /protocols/Steam/src/steam_utils.cpp
parent13eb656152eb83e6b246293da72294ce22c6cc48 (diff)
Steam: Refactor statuses support
- allow changing own status - change own status when it changes on server - temporary don't distinguish between playing/not playing contacts - fix steam<->miranda status mapping git-svn-id: http://svn.miranda-ng.org/main/trunk@11291 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/steam_utils.cpp')
-rw-r--r--protocols/Steam/src/steam_utils.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/protocols/Steam/src/steam_utils.cpp b/protocols/Steam/src/steam_utils.cpp
index 1e7d27b3ec..7c5888645f 100644
--- a/protocols/Steam/src/steam_utils.cpp
+++ b/protocols/Steam/src/steam_utils.cpp
@@ -6,17 +6,18 @@ WORD CSteamProto::SteamToMirandaStatus(int state)
{
case 0: //Offline
return ID_STATUS_OFFLINE;
+ case 1: //Online
+ return ID_STATUS_ONLINE;
case 2: //Busy
return ID_STATUS_DND;
case 3: //Away
return ID_STATUS_AWAY;
- case 4: //Playing
+ case 4: //Snoozing
+ return ID_STATUS_NA;
+ case 5: //Looking to trade
return ID_STATUS_OUTTOLUNCH;
- /*case 5: //Looking to trade
- return "trade";
- case 6: //Looking to play
- return "play";*/
- //case 1: //Online
+ case 6: //Looking to play
+ return ID_STATUS_FREECHAT;
default:
return ID_STATUS_ONLINE;
}
@@ -28,19 +29,20 @@ int CSteamProto::MirandaToSteamState(int status)
{
case ID_STATUS_OFFLINE:
return 0; //Offline
+ case ID_STATUS_ONLINE:
+ return 1; //Online
case ID_STATUS_DND:
return 2; //Busy
case ID_STATUS_AWAY:
return 3; //Away
- /*case PF2_OUTTOLUNCH:
- return 4; //Playing
- case 5: //Looking to trade
- return "trade";
- case 6: //Looking to play
- return "play";*/
- //case 1: //Online
+ case ID_STATUS_NA:
+ return 4; //Snoozing
+ case ID_STATUS_OUTTOLUNCH:
+ return 5; //Looking to trade
+ case ID_STATUS_FREECHAT:
+ return 6; //Looking to play
default:
- return ID_STATUS_ONLINE;
+ return 1;
}
}