5
|
1 |
/*
|
|
2 |
* Copyright (c) 2007 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 the License "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 |
|
|
18 |
|
|
19 |
#ifndef __CHANGESTATUS_H
|
|
20 |
#define __CHANGESTATUS_H
|
|
21 |
|
|
22 |
/**
|
|
23 |
* This class implements ChangeStatus SAPI core logic.It includes
|
|
24 |
* methods for changing the status of message flag and deleting a message.
|
|
25 |
*
|
|
26 |
*/
|
|
27 |
class CMessageChangeStatus : public CBase
|
|
28 |
{
|
|
29 |
|
|
30 |
public:
|
|
31 |
|
|
32 |
/*
|
|
33 |
* Creates a new instance of a @ref CMessageChangeStatus
|
|
34 |
* @param CMsvSession
|
|
35 |
* @return The newly created CMessageChangeStatus
|
|
36 |
*/
|
|
37 |
static CMessageChangeStatus* NewL( CMsvSession& aSession );
|
|
38 |
|
|
39 |
/*
|
|
40 |
* Creates a new instance of a @ref CMessageChangeStatus
|
|
41 |
* @param CMsvSession
|
|
42 |
* @return The newly created CMessageChangeStatus
|
|
43 |
*/
|
|
44 |
static CMessageChangeStatus* NewLC( CMsvSession& aSession );
|
|
45 |
|
|
46 |
/**
|
|
47 |
* Destructor.
|
|
48 |
*/
|
|
49 |
~CMessageChangeStatus();
|
|
50 |
|
|
51 |
/**
|
|
52 |
* Deletes the message of specified ID
|
|
53 |
* @param aMsgId It is ID of message to be deleted
|
|
54 |
* @param aNotifyCallback a callback object
|
|
55 |
*/
|
|
56 |
void DeleteMessageL( const TMsvId& aMsgId );
|
|
57 |
|
|
58 |
/**
|
|
59 |
* Changes the message flag to the value specified
|
|
60 |
* @param aMsgId It is ID of message
|
|
61 |
* @param aStatusFlag Message status flag
|
|
62 |
* @param aValue Message status flag value
|
|
63 |
* @param aNotifyCallback a callback object
|
|
64 |
*/
|
|
65 |
void ChangeStatusL(const TMsvId& aMsgId,
|
|
66 |
const TMessageStatusFlag aStatusFlag,
|
|
67 |
const TBool aValue );
|
|
68 |
|
|
69 |
private:
|
|
70 |
|
|
71 |
/**
|
|
72 |
* Default constructor.
|
|
73 |
* @param aSession It is an object of CMsvSession Class which
|
|
74 |
* represents a channel of communication between a client thread
|
|
75 |
* and the Message Server thread .
|
|
76 |
*/
|
|
77 |
CMessageChangeStatus(CMsvSession& aSession);
|
|
78 |
|
|
79 |
/**
|
|
80 |
* Initializer
|
|
81 |
*/
|
|
82 |
void InitializeL();
|
|
83 |
|
|
84 |
/**
|
|
85 |
* changes the message status
|
|
86 |
*/
|
|
87 |
void ChangeStatusL();
|
|
88 |
|
|
89 |
/**
|
|
90 |
* completes delete request
|
|
91 |
*/
|
|
92 |
void DeleteMessageL();
|
|
93 |
|
|
94 |
private:
|
|
95 |
|
|
96 |
/**
|
|
97 |
* Message server session.
|
|
98 |
*/
|
|
99 |
CMsvSession& iServerSession;
|
|
100 |
|
|
101 |
/**
|
|
102 |
* Message ID
|
|
103 |
*/
|
|
104 |
TMsvId iMessageId;
|
|
105 |
|
|
106 |
/**
|
|
107 |
* Message entry
|
|
108 |
*/
|
|
109 |
CMsvEntry* iEntry;
|
|
110 |
|
|
111 |
/**
|
|
112 |
* Index entry
|
|
113 |
*/
|
|
114 |
TMsvEntry iIndexEntry;
|
|
115 |
|
|
116 |
/**
|
|
117 |
* Message Status Flag
|
|
118 |
*/
|
|
119 |
TMessageStatusFlag iStatusFlag;
|
|
120 |
|
|
121 |
/**
|
|
122 |
* status flag value.
|
|
123 |
*/
|
|
124 |
TBool iFlagValue;
|
|
125 |
|
|
126 |
};
|
|
127 |
|
|
128 |
|
|
129 |
#endif __CHANGESTATUS_H |