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