epoc32/include/cntdbobs.h
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- a/epoc32/include/cntdbobs.h	Tue Mar 16 16:12:26 2010 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,150 +0,0 @@
     1.4 -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 -// All rights reserved.
     1.6 -// This component and the accompanying materials are made available
     1.7 -// 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
     1.8 -// which accompanies this distribution, and is available
     1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 -//
    1.11 -// Initial Contributors:
    1.12 -// Nokia Corporation - initial contribution.
    1.13 -//
    1.14 -// Contributors:
    1.15 -//
    1.16 -// Description:
    1.17 -//
    1.18 -
    1.19 -#if !defined(__CNTDBOBS_H__)
    1.20 -#define __CNTDBOBS_H__
    1.21 -
    1.22 -#if !defined(__E32DEF_H__)
    1.23 -#include <e32def.h>
    1.24 -#endif
    1.25 -
    1.26 -#if !( defined __SYMBIAN_CNTMODEL_HIDE_DBMS__ && defined __SYMBIAN_CNTMODEL_USE_SQLITE__ ) && !defined __D32DBMS_H__ 
    1.27 -#include <d32dbms.h>
    1.28 -#else
    1.29 -#include <s32std.h>
    1.30 -#include <f32file.h>
    1.31 -#endif 
    1.32 -
    1.33 -#include <cntdef.h> //for tcontactitemid 
    1.34 -
    1.35 -/** Change event type. For events which update, delete or add a contact item, the 
    1.36 -ID of the item affected is provided in the TContactDbObserverEvent struct.
    1.37 -@publishedAll
    1.38 -@released
    1.39 - */
    1.40 -enum TContactDbObserverEventType
    1.41 -	{
    1.42 -	/** Null event type. */
    1.43 -	EContactDbObserverEventNull,
    1.44 -	/** Not currently used. */
    1.45 -	EContactDbObserverEventUnused,
    1.46 -	/** A contact item (not a template, group or own card) has been changed. */
    1.47 -	EContactDbObserverEventContactChanged,
    1.48 -	/** A contact item (not a template, group or own card) has been deleted. */
    1.49 -	EContactDbObserverEventContactDeleted,
    1.50 -	/** A contact item (not a template or group) has been added. */
    1.51 -	EContactDbObserverEventContactAdded,
    1.52 -	/** Unknown change event type. */
    1.53 -	EContactDbObserverEventUnknownChanges,
    1.54 -	/** Recover from a damaged database. */
    1.55 -	EContactDbObserverEventRecover,
    1.56 -	/** Rollback from a change to the database. */
    1.57 -	EContactDbObserverEventRollback,
    1.58 -	/** Database tables closed. */
    1.59 -	EContactDbObserverEventTablesClosed,
    1.60 -	/** Database tables opened. */
    1.61 -	EContactDbObserverEventTablesOpened,
    1.62 -	/** A contact card template has changed. */
    1.63 -	EContactDbObserverEventTemplateChanged,
    1.64 -	/** A contact card template has been deleted. */
    1.65 -	EContactDbObserverEventTemplateDeleted, 
    1.66 -	/** A contact card template has been added. */
    1.67 -	EContactDbObserverEventTemplateAdded,
    1.68 -	/** The database's current item has been deleted. */
    1.69 -	EContactDbObserverEventCurrentItemDeleted,
    1.70 -	/** The database's current item has changed. */
    1.71 -	EContactDbObserverEventCurrentItemChanged,
    1.72 -	/** The database's own card has changed. */
    1.73 -	EContactDbObserverEventOwnCardChanged,
    1.74 -	/** The database's preferred template has been set. (See CContactDatabase::SetPrefTemplateL()). */
    1.75 -	EContactDbObserverEventPreferredTemplateChanged,
    1.76 -	/** An own card has been deleted from the database. */
    1.77 -	EContactDbObserverEventOwnCardDeleted,
    1.78 -	/** A contact item group has been added. */
    1.79 -	EContactDbObserverEventGroupAdded,
    1.80 -	/** A contact item group has been updated. */
    1.81 -	EContactDbObserverEventGroupChanged,
    1.82 -	/** A contact item group has been deleted from the database. */
    1.83 -	EContactDbObserverEventGroupDeleted,
    1.84 -	/** The current database has changed. */
    1.85 -	EContactDbObserverEventCurrentDatabaseChanged,
    1.86 -	/** The phone number assigned to one of the speed dial positions 
    1.87 -	has been replaced, removed or modified.*/
    1.88 -	EContactDbObserverEventSpeedDialsChanged, 
    1.89 -	/** Not currently used. */
    1.90 -	EContactDbObserverEventSortOrderChanged,
    1.91 -	/** Contacts DB about to be backed up  */
    1.92 -	EContactDbObserverEventBackupBeginning,
    1.93 -	/** Contacts DB about to be restored */
    1.94 -	EContactDbObserverEventRestoreBeginning,
    1.95 -	/** The backup/restore operation has completed. */
    1.96 -	EContactDbObserverEventBackupRestoreCompleted,
    1.97 -	/** The restore operation has completed but the database could not be opened. */
    1.98 -	EContactDbObserverEventRestoreBadDatabase,
    1.99 -	/** Database has been compressed. */
   1.100 -	EContactDbObserverEventCompress
   1.101 -	};
   1.102 -
   1.103 -struct TContactDbObserverEvent
   1.104 -/** Contact database change event details. These include the type of change event 
   1.105 -and the ID of the contact item affected by the change, if relevant.
   1.106 -
   1.107 -An object of this type is passed to a contact database's change observer, 
   1.108 -see MContactDbObserver::HandleDatabaseEventL(). 
   1.109 -@publishedAll
   1.110 -@released
   1.111 -*/
   1.112 -	{
   1.113 -	/** The change event type. */
   1.114 -	TContactDbObserverEventType iType;
   1.115 -	/** The ID of the contact item affected. */
   1.116 -	TContactItemId iContactId;
   1.117 -	/** Identifies which connection to the contacts server generated the event. Use 
   1.118 -	CContactDatabase::ConnectionId() to get the ID of the current connection.
   1.119 -	
   1.120 -	Set to zero if the event has no meaningful connection ID. */
   1.121 -	TUint iConnectionId;
   1.122 -	};
   1.123 -
   1.124 -class MContactDbObserver
   1.125 -/** The interface for an observer that handles changes to a contact database.
   1.126 -
   1.127 -It specifies a single pure virtual function which should be implemented by 
   1.128 -the observer class to test the type of the change event (see the TContactDbObserverEventType 
   1.129 -enum) and handle it.
   1.130 -
   1.131 -There is no need for the observer class to explicitly test for all possible 
   1.132 -event types - the event is for information only and event types which are of no interest 
   1.133 -to the observer class can safely be ignored.
   1.134 -
   1.135 -The change event type (TContactDbObserverEventType) may be augmented 
   1.136 -in future releases with additional values.
   1.137 -
   1.138 -A contact database observer pointer is passed to the NewL() function for the 
   1.139 -CContactChangeNotifier class. 
   1.140 -@publishedAll
   1.141 -@released
   1.142 -*/
   1.143 -	{
   1.144 -public:
   1.145 -	/** Tests the contact database observer event type and handles it. The ID of a 
   1.146 -	contact affected by the change event, if relevant, can be retrieved via TContactDbObserverEvent::iContactId.
   1.147 -	
   1.148 -	@param aEvent Provides information about the change event. */
   1.149 -	virtual void HandleDatabaseEventL(TContactDbObserverEvent aEvent)=0;
   1.150 -	};
   1.151 -
   1.152 -
   1.153 -#endif