os/mm/devsoundextensions/ciextnfactoryplugins/ciextnserverplugin/src/ciextnserverpluginwrapper.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/devsoundextensions/ciextnfactoryplugins/ciextnserverplugin/src/ciextnserverpluginwrapper.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,78 @@
     1.4 +/*
     1.5 +* Copyright (c) 2002-2008 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:   Header definition of server plugin wrapper class implementig S60 custom interface.
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#ifndef CIEXTNSERVERPLUGINWRAPPER_H
    1.23 +#define CIEXTNSERVERPLUGINWRAPPER_H
    1.24 +
    1.25 +#include <e32base.h>
    1.26 +#include <MCustomInterface.h>
    1.27 +
    1.28 +// Forward declarations
    1.29 +class MCustomInterface;
    1.30 +class MyMCustomInterface;
    1.31 +
    1.32 +class CIExtnServerPluginWrapper : public CBase, 
    1.33 +                                  public MCustomInterface
    1.34 +    {
    1.35 +    public:  // Constructors and destructor
    1.36 +
    1.37 +        /**
    1.38 +        * Constructs, and returns a pointer to, a new CIExtnCustomInterfaceS60 object.
    1.39 +        * Leaves on failure..
    1.40 +        * @param MCustomInterface& aInterfaceRef A reference to MCustomInterface.
    1.41 +        * @return CIExtnCustomInterfaceS60* A pointer to newly created object.
    1.42 +        */
    1.43 +        static CIExtnServerPluginWrapper* NewL(MCustomInterface& aInterfaceRef);
    1.44 +
    1.45 +        /**
    1.46 +        * Destructor.
    1.47 +        */
    1.48 +        ~CIExtnServerPluginWrapper();
    1.49 +        
    1.50 +    public: 
    1.51 +        /**
    1.52 +        Obtain a custom interface
    1.53 +        @param aInterfaceId  The UID of the required custom interface
    1.54 +        @return a pointer to the custom interface
    1.55 +         */
    1.56 +        TAny* CustomInterface(TUid aInterfaceId);
    1.57 +        
    1.58 +    public:
    1.59 +        MCustomInterface* GetInterface();
    1.60 +        void Release();
    1.61 +    private:
    1.62 +
    1.63 +        /**
    1.64 +        * Default Constructor 
    1.65 +        */
    1.66 +        CIExtnServerPluginWrapper(MCustomInterface& aInterfaceRef);
    1.67 +
    1.68 +        /**
    1.69 +        * Second phase constructor.
    1.70 +        */
    1.71 +        void ConstructL();
    1.72 +
    1.73 +    private:
    1.74 +        MCustomInterface* iCustomInterfaceRef;
    1.75 +        MyMCustomInterface* iCustomInterfaceStub;
    1.76 +
    1.77 +    private:
    1.78 +        TUid iDtor_ID_Key;
    1.79 +    };
    1.80 +
    1.81 +#endif // CIEXTNSERVERPLUGINWRAPPER_H