Update contrib.
1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Client observer class
22 EXPORT_C TInt RDbNotifier::Open(RDbDatabase& aDatabase)
23 /** Opens a DBMS change notifier on a database.
25 Note that a notifier cannot be opened on a client side database.
27 @param aDatabase The database to be observed.
28 @return KErrNone if successful, otherwise another of the system-wide error
31 TRAPD(r,iNotifier=aDatabase.iDatabase->NotifierL());
35 EXPORT_C void RDbNotifier::Close()
36 /** Closes a DBMS change notifier. Any outstanding notification request is automatically
39 Note that this function can be called on a DBMS change notifier that has already
45 //LOCAL_C void Notify(RDbHandle<CDbNotifier>& aNotifier,TRequestStatus& aStatus,CDbNotifier::TType aType)
47 // aNotifier->Notify(aType,aStatus);
50 //EXPORT_C void RDbNotifier::NotifyUnlock(TRequestStatus& aStatus)
51 ///** Makes an asynchronous request for notification of a database event. All events,
52 //including the release of all read locks, are reported.
54 //When a database event occurs, the request completes and the TRequestStatus
55 //objectcontains one of the enumerators defined by the TEvent enumeration member.
57 //Alternatively, if an outstanding request is cancelled by a call to the Cancel()
58 //member function of this class, then the request completes with KErrCancel.
60 //Only one notification request can be outstanding on this notifier at any one
63 //Note that if further database events occur while a client is handling a request
64 //completion, the notifier records the most significant database event and this
65 //is signalled as soon as the client issues the next NotifyUnlock() or NotifyChange()
68 //@param aStatus The request status object. If the request is cancelled, this
69 //is set to KErrCancel. If the request completes normally, this is set to one
70 //of the enumerator values defined by the TEvent enumeration member. */
72 // ::Notify(iNotifier,aStatus,CDbNotifier::EUnlock);
75 //EXPORT_C void RDbNotifier::NotifyChange(TRequestStatus& aStatus)
76 ///** Makes an asynchronous request for notification of changes to the database.
78 //All events which indicate a change to the database are reported; in practice,
79 //this means all database events except RDbNotifier::EUnlock.
81 //When a change event occurs, the request completes and the TRequestStatus object
82 //contains one of the appropriate enumerators defined by the TEvent enumeration
85 //Alternatively, if an outstanding request is cancelled by a call to the Cancel()
86 //member function of this class, then the request completes with KErrCancel.
88 //Only one notification request can be outstanding on this notifier at any one
91 //Note that if further database events occur while a client is handling a request
92 //completion, the notifier records the most significant database event and this
93 //is signalled as soon as the client issues the next NotifyUnlock() or NotifyChange()
96 //@param aStatus The request status object. If the request is cancelled, this
97 //is set to KErrCancel. If the request completes normally, this is set to one
98 //of the enumerator values defined by the TEvent enumeration member. */
100 // ::Notify(iNotifier,aStatus,CDbNotifier::EChange);
103 //EXPORT_C void RDbNotifier::Cancel()
104 ///** Cancels any outstanding notification request to this DBMS notifier.
106 //The outstanding request completes with a KErrCancel. */
108 // iNotifier->Cancel();