epoc32/include/app/calchangecallback.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     7 //
     8 // Initial Contributors:
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
     9 // Nokia Corporation - initial contribution.
    10 //
    10 //
    11 // Contributors:
    11 // Contributors:
    82 @released
    82 @released
    83 */
    83 */
    84 class MCalChangeCallBack2
    84 class MCalChangeCallBack2
    85 	{
    85 	{
    86 public:
    86 public:
    87 	/** Instance view change type
    87 	/**
    88 	@publishedAll
    88 	Type of change to the entry.
    89 	@released
       
    90 	*/
    89 	*/
    91 	enum TChangeType
    90 	enum TChangeType
    92 		{
    91 		{
    93 		/**	Entries are added */
    92 		/**	Calendar entry added. */
    94 		EChangeAdd,
    93 		EChangeAdd,
    95 		/** Entries are deleted */
    94 		/** Calendar entry deleted. */
    96 		EChangeDelete,
    95 		EChangeDelete,
    97 		/** Entries are modified */
    96 		/** Calendar entry modified. */
    98 		EChangeModify,
    97 		EChangeModify,
    99 		/** Undefined entries */
    98 		/** Undefined Calendar entry change. */
   100 		EChangeUndefined
    99 		EChangeUndefined,
   101 		};
   100 		/** The time zone rules for one or more Calendar entries have changed. */
   102 
   101 		EChangeTzRules,
   103 	/** Instance view entry type
   102         /** Backup Starts
   104 	@publishedAll
   103         * When the backup event is in process, the Calendar file is locked. 
   105 	@released
   104         * Most of operations are not permitted when it happens. However, few
       
   105         * operations, such as notification request, enabling broadcast
       
   106         * and closing Calendar is still permitted.
       
   107         * */
       
   108         EBackupStart,
       
   109         /** Restore Starts 
       
   110         * When the restore event is in process, the Calendar file is locked. 
       
   111         * Most of operations are not permitted when it happens. However, few
       
   112         * operations, such as notification request, enabling broadcast
       
   113         * and closing Calendar is still permitted.
       
   114         */
       
   115         ERestoreStart,       
       
   116         /** Backup Ends 
       
   117         * When the backup event is completed, the Calendar file is unlocked. 
       
   118         * The application can continue to operate on the current Calendar file.
       
   119         */
       
   120         EBackupEnd,
       
   121         /** Restore Ends
       
   122         * When the restore event is completed, the Calendar file is unlocked. 
       
   123         * The application can operate on the restored Calendar file after the application
       
   124         * is notified with the message. However, if the application has cached any
       
   125         * Calendar objects, such as Calendar file ID, Calendar entries, Calendar instances,
       
   126         * they are not necessarily synched with the data in the newly restored Calendar file. 
       
   127         */
       
   128         ERestoreEnd,
       
   129         /** The restored Calendar file can not be opened 
       
   130         * When the restore event is completed, the newly restored Calendar file can not
       
   131         * be opened. It is because either the file version is not supported or the data is corrupted.
       
   132         * Apart from closing the session and delete the file, no any other operation is permitted
       
   133         * when it happens.
       
   134         */
       
   135         ERestoredFileCanNotBeOpened
       
   136 		};
       
   137 
       
   138 	/**
       
   139 	Type of entry.
   106 	*/
   140 	*/
   107 	enum TChangeEntryType
   141 	enum TChangeEntryType
   108 		{
   142 		{
   109 		/** Entry type is todo */
   143 		/** Entry type is todo. */
   110 		EChangeEntryTodo,
   144 		EChangeEntryTodo,
   111 		/** Entry type is event */
   145 		/** Entry type is event. */
   112 		EChangeEntryEvent,
   146 		EChangeEntryEvent,
   113 		/** All entry types */
   147 		/** All entry types. */
   114 		EChangeEntryAll
   148 		EChangeEntryAll
   115 		};
   149 		};
   116 	/** A call back function for change notification
   150 
   117 	@param aChangeItems  List of changes since the last notification.
   151 	/**
   118 
   152 	A call back function for change notification.
       
   153 	
       
   154 	@param aChangeItems List of changes since the last notification.
   119 	*/
   155 	*/
   120 	virtual void CalChangeNotification(RArray<TCalChangeEntry>& aChangeItems) = 0;
   156 	virtual void CalChangeNotification(RArray<TCalChangeEntry>& aChangeItems) = 0;
   121 	};
   157 	};
   122 
   158 
   123 /** Struct for storing change notification data.
   159 /**
   124 This contains the calendar local ID, the type of change and the entry type.
   160 A structure for storing Calendar change notification data.  This contains the
   125 
   161 Calendar entry local UID, the type of change and the entry type.
   126 The iChangeType will only be set to EChangeEntryTodo or EChangeEntryEvent
   162 
   127 values. EChangeEntryAll is provided for callback registration only.
   163 The iChangeEntryType member may be set to MCalChangeCallBack2::EChangeEntryTodo
   128 
   164 or MCalChangeCallBack2::EChangeEntryEvent.  MCalChangeCallBack2::EChangeEntryAll
   129 If iChangeType is EChangeUndefined or EChangeOverflowError, iEntryId and
   165 is provided for call back registration only.
   130 iEntryType are undefined and should not be used by clients.
   166 
       
   167 If the iChangeType member is MCalChangeCallBack2::EChangeUndefined or
       
   168 MCalChangeCallBack2::EChangeTzRules, iEntryId and iEntryType are undefined and
       
   169 should not be used by clients.
       
   170 
       
   171 When the iChangeType member is MCalChangeCallBack2::EChangeTzRules a change in
       
   172 time zone rules has been detected and processed by the Calendar server.  The
       
   173 client should refresh any instance data they own as a result of this change.
   131 
   174 
   132 @publishedAll
   175 @publishedAll
   133 @released
   176 @released
   134 */
   177 */
   135 struct TCalChangeEntry
   178 struct TCalChangeEntry
   136 	{
   179 	{
   137 	/** Local UID of the entry */
   180 	/** Local UID of the entry. */
   138 	TCalLocalUid iEntryId;
   181 	TCalLocalUid iEntryId;
   139 	/** Type of change to the entry */
   182 	/** Type of change to the entry. */
   140 	MCalChangeCallBack2::TChangeType iChangeType;
   183 	MCalChangeCallBack2::TChangeType iChangeType;
   141 	/** Type of entry */
   184 	/** Type of entry. */
   142 	MCalChangeCallBack2::TChangeEntryType iEntryType;
   185 	MCalChangeCallBack2::TChangeEntryType iEntryType;
   143 	};
   186 	};
   144 
   187 
   145 /** Class to encapsulate call back registration parameters.
   188 /** Class to encapsulate call back registration parameters.
   146 
   189