30
|
1 |
/*
|
|
2 |
* Copyright (c) 2002-2008 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: Global Data for Calendar application
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef CALENFILEMAPPING_H_
|
|
19 |
#define CALENFILEMAPPING_H_
|
|
20 |
|
|
21 |
#include <e32cons.h>
|
|
22 |
#include <calsession.h>
|
|
23 |
|
|
24 |
class CCalEntryView;
|
|
25 |
class CCalenDbChangeNotifier;
|
|
26 |
|
|
27 |
|
|
28 |
/**
|
|
29 |
* Class Declaration.
|
|
30 |
* CCalenFileMapping is the implementation for holding information of Calendar.
|
|
31 |
*/
|
|
32 |
NONSHARABLE_CLASS( CCalenFileMapping ): public CBase
|
|
33 |
{
|
|
34 |
public:
|
|
35 |
|
|
36 |
/**
|
|
37 |
* First stage constructor
|
|
38 |
* Creates an instance of CCalenInfo and places it
|
|
39 |
* on the cleanup stack and then pops it before passing ownership to the caller.
|
|
40 |
*/
|
|
41 |
static CCalenFileMapping* NewL();
|
|
42 |
|
|
43 |
/**
|
|
44 |
* Class destructor
|
|
45 |
* Frees all resources used by this class
|
|
46 |
*/
|
|
47 |
~CCalenFileMapping();
|
|
48 |
|
|
49 |
public:
|
|
50 |
|
|
51 |
/*
|
|
52 |
* Get symbian calendar filename
|
|
53 |
* @return HBufC pointer to symbian calendar name
|
|
54 |
*/
|
|
55 |
const TDesC& GetCalendarFileName() const;
|
|
56 |
|
|
57 |
/*
|
|
58 |
* Set the symbain calendar filename
|
|
59 |
* @param TDesC referance to name
|
|
60 |
*/
|
|
61 |
void SetCalendarFileNameL(const TDesC& aCalendarFilename);
|
|
62 |
|
|
63 |
/*
|
|
64 |
* Get status of calendar
|
|
65 |
* @return TBool status hidden/visible
|
|
66 |
*/
|
|
67 |
TBool GetStatus();
|
|
68 |
|
|
69 |
/*
|
|
70 |
* Set the calendar status
|
|
71 |
* @param TBool aStatus hidden/visible
|
|
72 |
*/
|
|
73 |
void SetStatus(TBool aStatus);
|
|
74 |
|
|
75 |
/*
|
|
76 |
* Set collection id for the calendar
|
|
77 |
* @param TCalCollectionId collection id
|
|
78 |
*/
|
|
79 |
void SetCollectionId(TCalCollectionId aColId);
|
|
80 |
|
|
81 |
/*
|
|
82 |
* Get collection id for the calendar
|
|
83 |
* @return TCalCollectionId collection id
|
|
84 |
*/
|
|
85 |
TCalCollectionId GetCollectionId() const;
|
|
86 |
|
|
87 |
/*
|
|
88 |
* Set entry view for the calendar
|
|
89 |
* @param CCalEntryView pointer to entry view
|
|
90 |
*/
|
|
91 |
void SetEntryView(CCalEntryView* aEntryView);
|
|
92 |
|
|
93 |
/*
|
|
94 |
* Get entry view for the calendar
|
|
95 |
* @return CCalEntryView pointer entry view
|
|
96 |
*/
|
|
97 |
CCalEntryView *GetEntryView();
|
|
98 |
|
|
99 |
/*
|
|
100 |
* Set the session
|
|
101 |
* @param CCalSession pointer to a session
|
|
102 |
*/
|
|
103 |
void SetSessionPtr(CCalSession* aSessionPtr);
|
|
104 |
|
|
105 |
/*
|
|
106 |
* Get session pointer
|
|
107 |
* @return CCalSession pointer to session.
|
|
108 |
*/
|
|
109 |
CCalSession *GetSessionPtr();
|
|
110 |
|
|
111 |
/*
|
|
112 |
* Set the dbchangenotifier observer
|
|
113 |
* @param CCalSession pointer to a session
|
|
114 |
*/
|
|
115 |
void SetDBChangeNotifier(CCalenDbChangeNotifier* aDBChangeNotifier );
|
|
116 |
|
|
117 |
/*
|
|
118 |
* Get the dbchangenotifier observer.
|
|
119 |
* @return CCalSession pointer to session.
|
|
120 |
*/
|
|
121 |
CCalenDbChangeNotifier *GetDBChangeNotifier();
|
|
122 |
|
|
123 |
private:
|
|
124 |
|
|
125 |
/**
|
|
126 |
* Private constructor
|
|
127 |
*/
|
|
128 |
CCalenFileMapping( );
|
|
129 |
|
|
130 |
/**
|
|
131 |
* Second stage constructor
|
|
132 |
* Performs any leaving operations needed for construction.
|
|
133 |
*/
|
|
134 |
void ConstructL(); // second-phase constructor
|
|
135 |
|
|
136 |
private:
|
|
137 |
HBufC* iCalendarFileName;
|
|
138 |
TInt iStatus;
|
|
139 |
CCalSession* iSessionPtr;
|
|
140 |
TCalCollectionId iColId;
|
|
141 |
CCalEntryView* iEntryView;
|
|
142 |
CCalenDbChangeNotifier* iDBChangeNotifier;
|
|
143 |
};
|
|
144 |
|
|
145 |
|
|
146 |
#endif /* CALENFILEMAPPING_H_ */
|