summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/entities.h
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-11-19 19:18:00 +0000
committerRobert Pösel <robyer@seznam.cz>2013-11-19 19:18:00 +0000
commitd9afe7697ba309f6d78b61adea474942c0b55424 (patch)
tree5f1c65957f29d0fee1d381859c21ad58b562304b /protocols/FacebookRM/src/entities.h
parent3000e4130b54028e8b10040fda3d9fc6f7302959 (diff)
Facebook: distinguish more types of clients and don't reset old client at login/logoff
git-svn-id: http://svn.miranda-ng.org/main/trunk@6940 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/entities.h')
-rw-r--r--protocols/FacebookRM/src/entities.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/protocols/FacebookRM/src/entities.h b/protocols/FacebookRM/src/entities.h
index a52c3ed701..a924324019 100644
--- a/protocols/FacebookRM/src/entities.h
+++ b/protocols/FacebookRM/src/entities.h
@@ -37,7 +37,8 @@ struct facebook_user
bool deleted;
bool idle;
- bool mobile;
+
+ ClientType client;
facebook_user()
{
@@ -45,7 +46,8 @@ struct facebook_user
this->user_id = this->real_name = this->image_url = "";
this->status_id = ID_STATUS_OFFLINE;
this->gender = this->last_active = 0;
- this->deleted = this->idle = this->mobile = false;
+ this->deleted = this->idle = false;
+ this->client = CLIENT_WEB;
}
facebook_user(facebook_user* fu)
@@ -59,7 +61,24 @@ struct facebook_user
this->image_url = fu->image_url;
this->deleted = fu->deleted;
this->idle = fu->idle;
- this->mobile = fu->mobile;
+ this->client = fu->client;
+ }
+
+ TCHAR *getMirVer()
+ {
+ switch (this->client) {
+ case CLIENT_APP:
+ return _T(FACEBOOK_CLIENT_APP);
+ case CLIENT_MESSENGER:
+ return _T(FACEBOOK_CLIENT_MESSENGER);
+ case CLIENT_OTHER:
+ return _T(FACEBOOK_CLIENT_OTHER);
+ case CLIENT_MOBILE:
+ return _T(FACEBOOK_CLIENT_MOBILE);
+ case CLIENT_WEB:
+ default:
+ return _T(FACEBOOK_CLIENT_WEB);
+ }
}
};