b93378de620ee4dece28e95ea2b943ba9024d4e5
[situare] / src / facebookservice / facebookcredentials.h
1 /*
2    Situare - A location system for Facebook
3    Copyright (C) 2010  Ixonos Plc. Authors:
4
5        Ville Tiensuu - ville.tiensuu@ixonos.com
6
7    Situare is free software; you can redistribute it and/or
8    modify it under the terms of the GNU General Public License
9    version 2 as published by the Free Software Foundation.
10
11    Situare is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with Situare; if not, write to the Free Software
18    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
19    USA.
20 */
21
22 #ifndef FACEBOOKCREDENTIALS_H
23 #define FACEBOOKCREDENTIALS_H
24
25 #include <QString>
26
27 /**
28 * @brief Class is used to integrate facebook credentials together.
29 *
30 * @author Ville Tiensuu
31 * @class FacebookCredentials facebookcredentials.h "situare/src/facebookservice/facebookcredentials.h"
32 */
33 class FacebookCredentials
34 {
35 public:
36     /**
37     * @brief Default constructor
38     *
39     */
40     FacebookCredentials();
41
42     /**
43     * @brief Clears credentials
44     *
45     */
46     void clearCredentials();
47
48     /**
49     * @brief Set funtion for m_expires member
50     *
51     * @param expiresParameter value of parameter is set to m_expires member
52     */
53     void setExpires (const QString & expiresParameter);
54
55     /**
56     * @brief Set function for m_sessionKey member
57     *
58     * @param sessionKeyParameter value of parameter is set to m_sessionKey member
59     */
60     void setSessionKey(const QString & sessionKeyParameter);
61
62     /**
63     * @brief Set function for m_sessionSecret member
64     *
65     * @param sessionSecretParameter value of parameter is set to m_sessionSecret member
66     */
67     void setSessionSecret(const QString & sessionSecretParameter);
68
69     /**
70     * @brief Set funtion for m_sig member
71     *
72     * @param sigParameter value of parameter is set to m_sig member
73     */
74     void setSig(const QString & sigParameter);
75
76     /**
77     * @brief Set function for m_userID member
78     *
79     * @param userIDParameter value of parameter is set to m_userID member
80     */
81     void setUserID(const QString & userIDParameter);
82
83     /**
84     * @brief Get function for m_expires member
85     *
86     * @return QString m_expires
87     */
88     QString expires() const;
89
90     /**
91     * @brief Get function for m_sessionKey member
92     *
93     * @return QString m_sessionKey
94     */
95     QString sessionKey() const;
96
97     /**
98     * @brief Get funtion for m_sessionSecret member
99     *
100     * @return QString m_sessionSecret
101     */
102     QString sessionSecret() const;
103
104     /**
105     * @brief Get function for m_sig member
106     *
107     * @return QString m_sig
108     */
109     QString sig() const;
110
111     /**
112     * @brief Get function for m_userID member
113     *
114     * @return QString m_userID
115     */
116     QString userID() const;   
117
118     /**
119     * @brief Overloaded operator == is used to compare two FacebookCredentials.
120     *
121     * @param credentials to be checked
122     * @return bool returns true if all members are same, else returns false
123     */
124     bool operator==(const FacebookCredentials& credentials);
125
126 private:
127
128     /**
129     * @brief String for storing expires
130     *
131     * @var m_expires
132     */
133     QString m_expires;
134
135     /**
136     * @brief String for storing sessionKey
137     *
138     * @var m_sessionKey
139     */
140     QString m_sessionKey;
141
142     /**
143     * @brief String for storing sessionSecret
144     *
145     * @var m_sessionSecret
146     */
147     QString m_sessionSecret;
148
149     /**
150     * @brief String for storing sig
151     *
152     * @var m_sig
153     */
154     QString m_sig;
155
156     /**
157     * @brief String for storing userID
158     *
159     * @var m_userID
160     */
161     QString m_userID;    
162 };
163
164 #endif // FACEBOOKCREDENTIALS_H