epoc32/include/app/MVPbkContactFindObserver.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/app/MVPbkContactFindObserver.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,79 @@
     1.4 +/*
     1.5 +* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:  Virtual Phonebook observer interface for find operation.
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#ifndef MVPBKCONTACTFINDOBSERVER_H
    1.23 +#define MVPBKCONTACTFINDOBSERVER_H
    1.24 +
    1.25 +// INCLUDE FILES
    1.26 +#include <e32cmn.h>
    1.27 +#include <e32base.h>
    1.28 +// included here, instead of forward declared, so that clients
    1.29 +// don't delete an incomplete class.
    1.30 +#include <mvpbkcontactlinkarray.h>
    1.31 +
    1.32 +
    1.33 +/**
    1.34 + * Virtual Phonebook Find observer.
    1.35 + * This interface is used to signal find clients of the operation 
    1.36 + * progress and give the find results to the client.
    1.37 + */
    1.38 +class MVPbkContactFindObserver
    1.39 +    {
    1.40 +    public: // Interface
    1.41 +        /**
    1.42 +         * Called when find is complete. Caller takes ownership of the results
    1.43 +         * In case of an error during find, the aResults may contain only 
    1.44 +         * partial results of the find
    1.45 +         *
    1.46 +         * @param aResults Array of contact links that matched the find
    1.47 +         *                 Callee must take ownership of this object in
    1.48 +         *                 the start of the function, ie. in case the 
    1.49 +         *                 function leaves the results must be destroyed. 
    1.50 +         *                 The find operation can be destroyed at the end 
    1.51 +         *                  of this callback.
    1.52 +         */
    1.53 +        virtual void FindCompleteL( MVPbkContactLinkArray* aResults ) = 0;
    1.54 +
    1.55 +        /**
    1.56 +         * Called in case the find fails for some reason. The find operation
    1.57 +         * can be destroyed at the end of this callback.
    1.58 +         * 
    1.59 +         * @param aError One of the system wide error codes.
    1.60 +         *        KErrNotReady if store is not ready (not open or unavailable)
    1.61 +         */
    1.62 +        virtual void FindFailed( TInt aError ) = 0;
    1.63 +
    1.64 +        /**
    1.65 +         * Returns an extension point for this interface or NULL.
    1.66 +         * @param aExtensionUid Uid of extension.
    1.67 +         * @return Extension point or NULL.
    1.68 +         */
    1.69 +        virtual TAny* ContactFindObserverExtension( 
    1.70 +                TUid /*aExtensionUid*/ ) { return NULL; }
    1.71 +
    1.72 +    protected:  // Destructor
    1.73 +        /**
    1.74 +         * Destructor.
    1.75 +         */
    1.76 +        virtual ~MVPbkContactFindObserver() { }
    1.77 +
    1.78 +	};
    1.79 +
    1.80 +#endif // MVPBKCONTACTFINDOBSERVER_H
    1.81 +
    1.82 +// End of File