epoc32/include/app/cpbkcontactchangenotifier.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/app/cpbkcontactchangenotifier.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/app/cpbkcontactchangenotifier.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,72 @@
     1.4 -cpbkcontactchangenotifier.h
     1.5 +/*
     1.6 +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* 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.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description: 
    1.19 +*       Class for registering CPbkContactEngine observers.
    1.20 +*
    1.21 +*/
    1.22 +
    1.23 +
    1.24 +#ifndef __CPbkContactChangeNotifier_H__
    1.25 +#define __CPbkContactChangeNotifier_H__
    1.26 +
    1.27 +//  INCLUDES
    1.28 +#include <e32base.h>  // CBase
    1.29 +
    1.30 +// FORWARD DECLARATIONS
    1.31 +class CPbkContactEngine;
    1.32 +class MPbkContactDbObserver;
    1.33 +
    1.34 +
    1.35 +// CLASS DECLARATION
    1.36 +
    1.37 +/**
    1.38 + * A class used for registering as an observer for contact database
    1.39 + * change events. 
    1.40 + */
    1.41 +class CPbkContactChangeNotifier : public CBase
    1.42 +    {
    1.43 +    public:  // Constructors and destructor
    1.44 +        /**
    1.45 +         * Creates a new instance of this class and registers aObserver as an
    1.46 +         * observer of aEngine.
    1.47 +         *
    1.48 +         * @param aEngine   The observed object.
    1.49 +         * @param aObserver The observer to call when database changes occur.
    1.50 +         * @return  A contact change notifier instance.
    1.51 +         */
    1.52 +        IMPORT_C static CPbkContactChangeNotifier* NewL
    1.53 +            (CPbkContactEngine& aEngine, MPbkContactDbObserver* aObserver);
    1.54 +
    1.55 +        /**
    1.56 +         * Removes the aObserver from aEngine given as paramters to NewL and
    1.57 +         * destructs this object.
    1.58 +         */
    1.59 +        ~CPbkContactChangeNotifier();
    1.60 +
    1.61 +    private:  // Implementation
    1.62 +        CPbkContactChangeNotifier
    1.63 +            (MPbkContactDbObserver* aObserver);
    1.64 +        void ConstructL(CPbkContactEngine& aEngine);
    1.65 +
    1.66 +    private:  // data
    1.67 +        /// Ref: Phonebook engine
    1.68 +        CPbkContactEngine* iEngine;
    1.69 +        /// Ref: the observer
    1.70 +        MPbkContactDbObserver* iObserver;
    1.71 +    };
    1.72 +
    1.73 +
    1.74 +#endif // __CPbkContactChangeNotifier_H__
    1.75 +
    1.76 +// End of File