FacebookAuthentication Class Reference
FacebookAuthentication class takes care of parsing and handling of credentials for Facebook. Other components of Situare application needs credentials to communicate with facebook.
More...
#include <facebookauthentication.h>
List of all members.
Public Slots |
void | clearAccountInformation (bool keepUsername=false) |
| Clears account iformation from settings.
|
const QString | loadUsername () |
| Loads username from settings.
|
void | saveUsername (const QString &username) |
| Saves username to settings.
|
void | start () |
| Shows the m_webView and loads page that is specified in the m_facebookLoginPage variable. Specifies font size for the page.
|
Signals |
void | error (const int context, const int error) |
| Signals error.
|
void | credentialsReady (const FacebookCredentials &credentials) |
| This signal is emitted if updateCredentials method finds credentials from URL. Signal is also emitted at the beginning of the program if there is valid credentials in the file.
|
void | loginUsingCookies () |
| This signal is emitted always when login is called. At first the application tries to login using saved cookies.
|
void | newLoginRequest () |
| Signals when credentials are invalid new login is needed.
|
void | saveCookiesRequest () |
| This signal is emitted when new cookies need to be saved.
|
Public Member Functions |
| FacebookAuthentication (QObject *parent=0) |
| FacebookAuthentication constructor.
|
FacebookCredentials | loginCredentials () const |
| Getter for m_loginCredentials.
|
Private Slots |
bool | updateCredentials (const QUrl &url) |
| Search credentials from URL that is given as parameter. If credentials are found thay are stored to loginCredentials variable.
|
Private Attributes |
bool | m_freshLogin |
| Flag for fresh login.
|
FacebookCredentials | m_loginCredentials |
| Dataclass that contains authorization to use facebook. Dataclass is composed of five QStrings and setters and getters.
|
Detailed Description
FacebookAuthentication class takes care of parsing and handling of credentials for Facebook. Other components of Situare application needs credentials to communicate with facebook.
- Author:
- Ville Tiensuu
Constructor & Destructor Documentation
FacebookAuthentication::FacebookAuthentication |
( |
QObject * |
parent = 0 |
) |
|
FacebookAuthentication constructor.
-Checks if there is valid credentials stored on the file. If there is emits signal.
- Parameters:
-
| parent | instance of parent |
Member Function Documentation
void FacebookAuthentication::clearAccountInformation |
( |
bool |
keepUsername = false |
) |
[slot] |
Clears account iformation from settings.
- Parameters:
-
| keepUsername | keep = true, false otherwise |
void FacebookAuthentication::credentialsReady |
( |
const FacebookCredentials & |
credentials |
) |
[signal] |
This signal is emitted if updateCredentials method finds credentials from URL. Signal is also emitted at the beginning of the program if there is valid credentials in the file.
- Parameters:
-
| credentials | New credentials |
void FacebookAuthentication::error |
( |
const int |
context, |
|
|
const int |
error | |
|
) |
| | [signal] |
Signals error.
- Parameters:
-
| context | error context |
| error | error code |
const QString FacebookAuthentication::loadUsername |
( |
|
) |
[slot] |
Loads username from settings.
- Returns:
- QString Loaded username
void FacebookAuthentication::saveUsername |
( |
const QString & |
username |
) |
[slot] |
Saves username to settings.
- Parameters:
-
| username | Username to be saved |
bool FacebookAuthentication::updateCredentials |
( |
const QUrl & |
url |
) |
[private, slot] |
Search credentials from URL that is given as parameter. If credentials are found thay are stored to loginCredentials variable.
- Parameters:
-
| url | URL where this method tries to find credentials. |
- Returns:
- bool if credentials are found returns true, if credentials are not found returns false.
The documentation for this class was generated from the following files: