|
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 __ADDENTRY_H |
|
20 #define __ADDENTRY_H |
|
21 |
|
22 class CEntryAttributes; |
|
23 |
|
24 /** |
|
25 * This class provides functions to add a new calendar entry or modify |
|
26 * an existing calendar entry. |
|
27 */ |
|
28 class CCalendarAddEntry : public CBase |
|
29 { |
|
30 |
|
31 public: |
|
32 /** |
|
33 * Two-phased constructor. |
|
34 * @param aSessionInfo Object of CCalendarSessionInfo class which |
|
35 * contains information for a calendar session. |
|
36 * @param aCalendarData Attributes of the entry |
|
37 * @return CAddEntry object |
|
38 */ |
|
39 static CCalendarAddEntry* NewL( CCalendarSessionInfo* aSessionInfo, |
|
40 CEntryAttributes* aCalendarData ) ; |
|
41 |
|
42 /** |
|
43 * Destructor. |
|
44 * @param |
|
45 * @return |
|
46 */ |
|
47 ~CCalendarAddEntry(); |
|
48 |
|
49 /** |
|
50 * Adds/Updates entry in a specific calendar file |
|
51 * @param aGuidAdded A structure containing the Global Uid and |
|
52 * LocalUid of the entry that was successfully added/updated. |
|
53 */ |
|
54 void AddL( TUIDSet*& aGuidAdded ); |
|
55 |
|
56 |
|
57 private: |
|
58 |
|
59 /** |
|
60 * Constructor. |
|
61 * @param aSessionInfo Object of CCalendarSessionInfo class which |
|
62 * contains information for a calendar session. |
|
63 */ |
|
64 CCalendarAddEntry( CCalendarSessionInfo* aSessionInfo, |
|
65 CEntryAttributes* aCalendarData ); |
|
66 |
|
67 /** |
|
68 * Adds entry in a specific calendar file |
|
69 * @param aGuidAdded A structure containing the Global Uid and |
|
70 * LocalUid of the entry that was successfully added. |
|
71 */ |
|
72 void AddNewEntryL( TUIDSet*& aGuidAdded ); |
|
73 |
|
74 /** |
|
75 * Updates entry in a specific calendar file |
|
76 * @param aGuidAdded A structure containing the Global Uid and |
|
77 * LocalUid of the entry that was successfully updated. |
|
78 */ |
|
79 void UpdateEntryL( TUIDSet*& aGuidAdded ); |
|
80 |
|
81 /** |
|
82 * Updates an existing calendar entry without adding a new entry to the calendar store |
|
83 * @param aCalendarData A structure containing entry attributes to be modified |
|
84 * @param aEntry The calendar entry to be modified |
|
85 */ |
|
86 void UpdateEntryAttributesL( CCalEntry* aEntry ); |
|
87 |
|
88 /** |
|
89 * Retrieves the instance for the given local uid |
|
90 * @param aInsStTime Instance start time |
|
91 * @param aLUid Local Uid |
|
92 * @return CCalInstance* |
|
93 */ |
|
94 CCalInstance* GetInstanceL( const TCalTime& aInsStTime, TCalLocalUid aLUid ); |
|
95 |
|
96 void SetStartEndTimeL( CCalEntry* aEntry, const TCalTime& aStTime, const TCalTime& aEndTime ); |
|
97 |
|
98 private: |
|
99 |
|
100 /** |
|
101 * CCalendarSessionInfo object containing session information |
|
102 */ |
|
103 CCalendarSessionInfo* iSessionInfo; |
|
104 |
|
105 CEntryAttributes* iCalendarEntry; |
|
106 }; |
|
107 |
|
108 |
|
109 #endif __ADDENTRY_H |