Inherits MEngineNotifier, and MTimeoutNotifier.
Public Member Functions | |
~CTaskManagerEngine () | |
void | SetConnectionSettings (const TDesC &aServerName, const TInt &aPort, const TDesC &aUsername, const TDesC &aPassword) |
void | FetchTasksL () |
void | MarkTaskDoneL (const TInt &aTaskId) |
void | CheckRefreshL () |
TBool | PackageReceivedL (const TDesC8 &aData) |
void | TimerExpired () |
void | SetIap (const TUint32 &aId) |
void | CancelTransaction () |
TBool | IapSet () const |
RArray< TIap > & | Iaps () |
void | SetAutomaticUpdateL (const TBool &aOn) |
Static Public Member Functions | |
static CTaskManagerEngine * | NewL (MTransactionObserver &aObserver) |
Protected Member Functions | |
void | DoCancel () |
void | RunL () |
TInt | RunError (TInt aError) |
An engine class. Used for communicating with the server. Listens also for incoming SMS messages.
Definition at line 112 of file TaskManagerEngine.h.
CTaskManagerEngine::~CTaskManagerEngine | ( | ) |
Destructor
Definition at line 83 of file TaskManagerEngine.cpp.
CTaskManagerEngine * CTaskManagerEngine::NewL | ( | MTransactionObserver & | aObserver | ) | [static] |
Two-phased constructor.
Definition at line 109 of file TaskManagerEngine.cpp.
void CTaskManagerEngine::DoCancel | ( | ) | [protected] |
Cancel any outstanding operation
Definition at line 490 of file TaskManagerEngine.cpp.
void CTaskManagerEngine::RunL | ( | ) | [protected] |
Called when an operation completes
Definition at line 544 of file TaskManagerEngine.cpp.
TInt CTaskManagerEngine::RunError | ( | TInt | aError | ) | [protected] |
Handles a leave occurring in the request completion event handler RunL()
Definition at line 677 of file TaskManagerEngine.cpp.
void CTaskManagerEngine::SetConnectionSettings | ( | const TDesC & | aServerName, | |
const TInt & | aPort, | |||
const TDesC & | aUsername, | |||
const TDesC & | aPassword | |||
) |
Sets the connections settings.
aServerName | name of the server. | |
aPort | Port number of the server. | |
aUsername | Username. | |
aPassword | Password. |
Definition at line 152 of file TaskManagerEngine.cpp.
void CTaskManagerEngine::FetchTasksL | ( | ) |
Will make a socket call to the server. As a result, we will get all tasks of the user.
Definition at line 219 of file TaskManagerEngine.cpp.
void CTaskManagerEngine::MarkTaskDoneL | ( | const TInt & | aTaskId | ) |
Will make a socket call to the server that is used for completing a wanted task.
aTaskId | The id of the task that is to be completed. |
Definition at line 235 of file TaskManagerEngine.cpp.
void CTaskManagerEngine::CheckRefreshL | ( | ) |
Checks if tasks needs to be reloaded. If so, starts the downloading process.
Definition at line 271 of file TaskManagerEngine.cpp.
TBool CTaskManagerEngine::PackageReceivedL | ( | const TDesC8 & | aData | ) | [virtual] |
Socket reader notifies the engine of a new package through this function.
aData | The package received. |
Implements MEngineNotifier.
Definition at line 741 of file TaskManagerEngine.cpp.
void CTaskManagerEngine::TimerExpired | ( | ) | [virtual] |
Called by the timer whenever a timeout occurs.
Implements MTimeoutNotifier.
Definition at line 807 of file TaskManagerEngine.cpp.
void CTaskManagerEngine::SetIap | ( | const TUint32 & | aId | ) |
With this function you can select which IAP is used for the connection.
aId | id of the IAP to be used. |
Definition at line 168 of file TaskManagerEngine.cpp.
void CTaskManagerEngine::CancelTransaction | ( | ) |
This method is used for cancelling a socket transaction.
Definition at line 250 of file TaskManagerEngine.cpp.
TBool CTaskManagerEngine::IapSet | ( | ) | const |
Returns whether IAP has been set or not.
Definition at line 178 of file TaskManagerEngine.cpp.
RArray< TIap > & CTaskManagerEngine::Iaps | ( | ) |
Returns all found IAPs.
Definition at line 410 of file TaskManagerEngine.cpp.
void CTaskManagerEngine::SetAutomaticUpdateL | ( | const TBool & | aOn | ) |
This function sets the automatic task loading on or off. If this functionality is set on, tasks are loaded automatically when an update SMS message is received.
aOn | ETrue if tasks are loaded automatically, EFalse if not. |
Definition at line 291 of file TaskManagerEngine.cpp.