1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/traceservices/tracefw/ulogger/inc/uloggerplugin.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,96 @@
1.4 +// Copyright (c) 2007-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 "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.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 +// ULogger plug-in base class
1.18 +//
1.19 +//
1.20 +
1.21 +/**
1.22 + @file
1.23 + @publishedPartner
1.24 + @prototype
1.25 +*/
1.26 +
1.27 +#ifndef ULOGGERPLUGIN_H
1.28 +#define ULOGGERPLUGIN_H
1.29 +
1.30 +#include <e32base.h>
1.31 +#include <ecom/implementationinformation.h>
1.32 +#include <ecom/ecomresolverparams.h>
1.33 +#include <ecom/ecom.h>
1.34 +
1.35 +namespace Ulogger
1.36 +{
1.37 +//! Base class for all ULogger plug-ins.
1.38 +/*!
1.39 +ULogger is extensible through a plug-in framework that uses ECom for plug-in
1.40 +discovery. Deriving from this class means that all the ECom-specific logic is
1.41 +already provided for the plug-in implementer, out-of-the-box, leaving the
1.42 +plug-in code to deal with the domain-specific logic that the plug-in is supposed
1.43 +to implement only.
1.44 +
1.45 +Among the plug-in types that are currently supported are output plug-ins (see
1.46 +class ULogger::MOutputPlugin in uloggeroutputplugin.h) and input plug-ins (see
1.47 +class ULogger::MInputPlugin in uloggerinputplugin.h).
1.48 +
1.49 +Plug-ins must derive from this class in order to be compatible with ULogger.
1.50 +*/
1.51 +class CPlugin : public CBase
1.52 + {
1.53 +public:
1.54 + /**
1.55 + Enum to signify plug-in interface types. Used by each specific plug-in
1.56 + interface (M-class) to identify itself as being of a particular type.
1.57 + */
1.58 + enum TPluginInterface
1.59 + {
1.60 + EOutput,//!< output plug-in interface type
1.61 + EInput //!< input plug-in interface type
1.62 + };
1.63 +
1.64 +public:
1.65 + /**
1.66 + Creates a CPlugin instance of the specified type and returns a pointer to
1.67 + it. The type is specified as the name of the ECom plug-in DLL (without the
1.68 + dll extension).
1.69 +
1.70 + @param aCue a descriptor containing the name of the plug-in to be created
1.71 + @return A pointer to the newly created CPlugin object.
1.72 + */
1.73 + static CPlugin* NewL(const TDesC8& aCue);
1.74 +
1.75 + /**
1.76 + Virtual destructor.
1.77 + */
1.78 + virtual ~CPlugin();
1.79 +
1.80 + /**
1.81 + Return pointer to requested interface.
1.82 + If plug-in implements multiple interfaces, it should return pointer to
1.83 + proper interface trough this method.
1.84 +
1.85 + @param aInterfaceId Number of requested interface.
1.86 + @return Pointer to requested interface or NULL if requested interface is not
1.87 + supported.
1.88 + */
1.89 + virtual TAny* GetInterfaceL(TPluginInterface aInterfaceId) = 0;
1.90 +
1.91 +private:
1.92 + TUid iDtor_ID_Key;
1.93 + };
1.94 +
1.95 +} //end of namespace
1.96 +
1.97 +#include "uloggerplugin.inl" // Our own base implementations for ECOM
1.98 +
1.99 +#endif /* ULOGGERPLUGIN_H */