summaryrefslogtreecommitdiff
path: root/plugins/WinterSpeak/src/UserInformation.h
diff options
context:
space:
mode:
authorPhilip Schell <github.com@blubbfish.net>2013-10-19 13:05:02 +0000
committerPhilip Schell <github.com@blubbfish.net>2013-10-19 13:05:02 +0000
commit397e25f2b71347c7c83495fe5b25496ff3b02b75 (patch)
tree71f6ad2ef525218541a7a35cc659b4fb7bf047d6 /plugins/WinterSpeak/src/UserInformation.h
parent9e786b686fae94e71279a797047a91ffdc4b0443 (diff)
WinterSpeak: ticket:269 WinterSpeak now rewritten
git-svn-id: http://svn.miranda-ng.org/main/trunk@6532 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/WinterSpeak/src/UserInformation.h')
-rw-r--r--plugins/WinterSpeak/src/UserInformation.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/plugins/WinterSpeak/src/UserInformation.h b/plugins/WinterSpeak/src/UserInformation.h
new file mode 100644
index 0000000000..a9d972d96d
--- /dev/null
+++ b/plugins/WinterSpeak/src/UserInformation.h
@@ -0,0 +1,53 @@
+#pragma once
+
+#include <map>
+#include <string>
+
+class UserInformation
+{
+ public:
+ UserInformation();
+ ~UserInformation();
+
+ //--------------------------------------------------------------------------
+ // Description : update the users status
+ // Parameters : user - the current user
+ // status - the users status
+ // Returns : true - the status changed
+ // false - the status stayed the same
+ //--------------------------------------------------------------------------
+ bool updateStatus(HANDLE user, int status);
+
+ //--------------------------------------------------------------------------
+ // Description : get a string containing the users current status string
+ // Parameters : user - the current user
+ // Returns : the string containing the users status
+ //--------------------------------------------------------------------------
+ std::wstring statusString(HANDLE user);
+
+ //--------------------------------------------------------------------------
+ // Description : return the status mode of the user
+ // Parameters : user - the current user
+ // Returns : the string containing the users status mode
+ //--------------------------------------------------------------------------
+ std::wstring statusModeString(HANDLE user);
+
+ //--------------------------------------------------------------------------
+ // Description : insert the name into the string at the %u location
+ // Parameters : str - the string to have the username inserted into
+ // user - the current user
+ //--------------------------------------------------------------------------
+ void insertName(std::wstring &str, HANDLE user) const;
+
+ //--------------------------------------------------------------------------
+ // Description : get the name string for the user
+ // Parameters : user - the current user
+ // Returns : a string containing the user's name
+ //--------------------------------------------------------------------------
+ std::wstring nameString(HANDLE user) const;
+
+ private:
+ std::map<HANDLE, int> m_status_info;
+ std::map<int, std::wstring> m_status_strings;
+};
+