93
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
#ifndef ACTIVITYOBSERVERTASK_H
|
|
18 |
#define ACTIVITYOBSERVERTASK_H
|
|
19 |
|
|
20 |
// INCLUDES
|
|
21 |
#include <e32std.h>
|
|
22 |
#include <e32base.h>
|
|
23 |
|
|
24 |
#include "activitytask.h"
|
|
25 |
#include "activitytaskstorage.h"
|
|
26 |
|
|
27 |
/**
|
|
28 |
* CActivityObserverTask
|
|
29 |
*
|
|
30 |
*/
|
|
31 |
class CActivityObserverTask : public CActivityTask
|
|
32 |
{
|
|
33 |
public:
|
|
34 |
/**
|
|
35 |
* Destructor.
|
|
36 |
*/
|
|
37 |
~CActivityObserverTask();
|
|
38 |
|
|
39 |
/**
|
|
40 |
* Handle observer request.
|
|
41 |
* @param globalStorage - global observers storage
|
|
42 |
* @param localStorage - local observers storage
|
|
43 |
* @param msg - request message
|
|
44 |
*/
|
|
45 |
static void ExecuteLD(MActivityTaskStorage& globalStorage,
|
|
46 |
MActivityTaskStorage& localStorage,
|
|
47 |
const RMessage2& msg);
|
|
48 |
|
|
49 |
/**
|
|
50 |
* Interface implementation
|
|
51 |
* @see CActivityTask::Data()
|
|
52 |
*/
|
|
53 |
const TDesC8& Data() const;
|
|
54 |
|
|
55 |
/**
|
|
56 |
* Interface implementation
|
|
57 |
* @see CActivityTask::BroadcastReceivedL(const RMessage2&)
|
|
58 |
*/
|
|
59 |
void BroadcastReceivedL(const RMessage2& );
|
|
60 |
|
|
61 |
private:
|
|
62 |
|
|
63 |
/**
|
|
64 |
* Constructor for performing 1st stage construction
|
|
65 |
* @param globalStorage - global observers storage
|
|
66 |
* @param localStorage - local observers storage
|
|
67 |
* @param msg - request message
|
|
68 |
*/
|
|
69 |
CActivityObserverTask(MActivityTaskStorage& globalStorage,
|
|
70 |
MActivityTaskStorage& localStorage,
|
|
71 |
const RMessage2& msg);
|
|
72 |
|
|
73 |
/**
|
|
74 |
* Write response data to requested message
|
|
75 |
*/
|
|
76 |
void WriteResponseL();
|
97
|
77 |
|
|
78 |
/**
|
|
79 |
* Returns ETrue if task is related with session argument
|
|
80 |
*/
|
|
81 |
TBool IsSessionTask(const CSession2* session);
|
93
|
82 |
|
|
83 |
private:
|
|
84 |
MActivityTaskStorage& mGlobalStorage;
|
|
85 |
MActivityTaskStorage& mLocalStorage;
|
|
86 |
const RMessage2 mMsg;
|
|
87 |
RBuf8 mData;
|
|
88 |
};
|
|
89 |
|
|
90 |
#endif // ACTIVITYOBSERVERTASK_H
|