CNSmlDMIAPMatcher Class Reference

class CNSmlDMIAPMatcher : public CBase

CNSmlDMIAPMatcher contains services for generating URI from IAPId and vice versa in DM plug-in adapters. The class needs the working MSmlDmCallback callback interface for operating, so ths can be used only by DM plug-in adapters

Since

Inherits from

Constructor & Destructor Documentation

~CNSmlDMIAPMatcher()

~CNSmlDMIAPMatcher()

Destructor

Member Functions Documentation

ConstructL(MSmlDmCallback *)

voidConstructL(MSmlDmCallback *aDmCallback)[private]

Second phase constructor

Parameters

MSmlDmCallback * aDmCallbackPointer to callback interface

DesToInt(const TDesC8 &)

TInt DesToInt(const TDesC8 &aLuid)[private]

Changes the given descriptor to Integer

Parameters

const TDesC8 & aLuidLuid in descriptor format

GetConRef()

const TDesC8 &GetConRef()[private]

Return the last uri segment of the aURI

IAPIdFromURIL(const TDesC8 &)

IMPORT_C TIntIAPIdFromURIL(const TDesC8 &aURI)

Gets the IAP id which corresponds to given URI

Parameters

const TDesC8 & aURIAccespoint URI

LastURISeg(const TDesC8 &)

TPtrC8 LastURISeg(const TDesC8 &aURI)const [private]

Return the last uri segment of the aURI

Parameters

const TDesC8 & aURIUri

NewL(MSmlDmCallback *)

IMPORT_C CNSmlDMIAPMatcher *NewL(MSmlDmCallback *aDmCallback)[static]

Two-phased constructor Example usage:

 // replace <featureUID> with a real UID 

 #include <featmgr/featmgr.h>
 #include <bldvariant.hrh> // for feature definitions

 CMyClass::ConstructL()
     {
     // Sets up TLS, must be done before FeatureManager is used.
     FeatureManager::InitializeLibL();
     // Used in destructor. 
     iFeatMgrInitialized = ETrue;
     }

 CMyClass::ShowMenuL()
     {
     if ( FeatureManager::FeatureSupported( <featureUID> ) )
         {
         // Feature supported, show menu item associated with it.
         }
     }

 CMyClass::~CMyClass()
     {
     // Do not call UnInitializeLib() if InitalizeLib() leaves.
     if ( iFeatMgrInitialized )
         {
	      // Frees the TLS. Must be done after FeatureManager is used.
         FeatureManager::UnInitializeLib();  
         }
     }

Parameters

MSmlDmCallback * aDmCallbackPointer to callback interface

NewLC(MSmlDmCallback *)

IMPORT_C CNSmlDMIAPMatcher *NewLC(MSmlDmCallback *aDmCallback)[static]

Two-phased constructor, pushes pointer to cleanup stack.

Parameters

MSmlDmCallback * aDmCallbackPointer to callback interface

RemoveDotSlash(const TDesC8 &)

TPtrC8 RemoveDotSlash(const TDesC8 &aURI)const [private]

Return the URI without ./ at the beginning, if those exist

Parameters

const TDesC8 & aURIUri

RemoveExtraChar(const TDesC8 &)

TPtrC8 RemoveExtraChar(const TDesC8 &aURI)const [private]

Return the URI without . or / at the end or beginng, if exist

Parameters

const TDesC8 & aURIUri

URIFromIAPIdL(TInt)

IMPORT_C HBufC8 *URIFromIAPIdL(TIntaIAPId)

Generates the URI which corresponds to given IAP Id

Parameters

TInt aIAPIdAccespoint Id

Member Data Documentation

MSmlDmCallback * iCallback

MSmlDmCallback *iCallback[private]

Pointer to callback interface

TBool iFeatMgrInitialized

TBool iFeatMgrInitialized[private]

Boolean to check FeatMgr Initialization