blob: c184e2ae592ae113ea99344d5094b358f8d60584 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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(MCONTACT 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(MCONTACT 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(MCONTACT 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, MCONTACT 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(MCONTACT user) const;
private:
std::map<MCONTACT, int> m_status_info;
std::map<int, std::wstring> m_status_strings;
};
|