diff -r d6ba66e59a81 -r 10ce313e5859 messagingfw/biomsgfw/cbcp/CBusinessCardParser class.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingfw/biomsgfw/cbcp/CBusinessCardParser class.htm Fri Jun 25 16:18:56 2010 +0530 @@ -0,0 +1,269 @@ + + + + + +CBusinessCardParser class + + + + +

CBusinessCardParser class — Compact Business Card Parser

+ +

Section Contents

+ + + +
+ +

Overview

+ +
Derivation
+ + + + + + + + + + + + + + +
CBaseAbstract: CBase behaviour
CActiveAbstract: active object: provides + facilities to encapsulate an asynchronous service, and to + handle its completion using RunL()
CBaseScriptParserAbstract: parser implementation.
+ +
Defined in
+ +

cbcp.h   

+ +
Link against
+ +

cbcp.lib

+ +
Description
+ +

This class provides functions to parse a Compact Business Card +message. The parser creates an informative message body for the +user and generates a vCard in the store associated with the +message.

+ +
+ +

Allocation +and construction

+ +
+ +

NewL() +— Create new CBusinessCardParser

+ +

static CBusinessCardParser* NewL(CRegisteredParserDll& +aRegisteredParserDll, CMsvServerEntry& aEntry, RFs& aFs);

+ +
Description
+ +

Use these functions to construct a new CBusinessCardParser +descriptor on the heap. Code should be provided to ensure that a +single copy of the DLL is loaded and is released when no longer +required.

+ +

If there is insufficient memory available to create the +descriptor, NewL() leaves. See Motivating E32 +exception facilities for more information on leave +processing.

+ +
Arguments
+ + + + + + + + + + + + + + +
CRegisteredParserDll& + aRegisteredParserDllA
CMsvServerEntry& + aEntryA message server entry containing the CBC message.
RFs& + aFsHandle of a file server session.
+ +
Return value
+ + + + + + +
CBusinessCardParser*The address of the newly created CBusinessCardParser + descriptor.

NewL() + leaves if there is insufficient memory.

+
+ +
Example
+ +

This code fragment illustrates how an CBusinessCardParser +descriptor can be constructed:

+ +

Use of NewL():

+ +
+

iRegisteredParserDll = + CRegisteredParserDll::NewL(uidType);
+ RLibrary parserlibrary;
+ User::LeaveIfError(iRegisteredParserDll->GetLibrary(gFs,parserlibrary));
+ typedef CBaseScriptParser* + (*NewParserL)(CRegisteredParserDll& aRegisteredParserDll, + CMsvServerEntry& aEntry, RFs& aFs);
+ TInt entrypointordinalnumber=1; // The one and only entry + point.
+ TLibraryFunction + libFunc=parserlibrary.Lookup(entrypointordinalnumber);
+ if (libFunc==NULL)
+ User::Leave(KErrBadLibraryEntryPoint);
+ NewParserL pFunc=(NewParserL) libFunc;
+ CBaseScriptParser* parser=NULL;
+ TInt refcount=iRegisteredParserDll->DllRefCount();
+ TRAPD(ret,parser=((*pFunc)(*iRegisteredParserDll, *iEntry, + gFs)));
+ if ((ret!=KErrNone) && + (iRegisteredParserDll->DllRefCount()==refcount))
+ iRegisteredParserDll->ReleaseLibrary();

+
+ +
+ +

API — Public functions

+ +

ParseL — +Parse a Compact +Business Card message.

+ +

void ParseL(TRequestStatus& aStatus, const TDesC& +aSms);

+ +
Description
+ +

Use this function to parse the Compact Business Card message +aSms, stored in the TDesC. The parser creates an informative +message body for the user and generates a vCard in the store +associated with the message.

+ +
Arguments
+ + + + + + + + + + +
TRequestStatus& aStatusThe request status of the active object.
const TDesC& aSmsAn SMS message.
+ +
Return value
+ + + + + +
void
+ +
Example
+ +

This code fragment illustrates how the parser is called:

+ +
+

iParser->ParseL(iStatus,iSms);

+
+ +
+ +

ProcessL — Parse a Compact +Business Card +message.

+ +

void ProcessL(TRequestStatus& aStatus);

+ +
Description
+ +

This function is not implemented in the current version of the +parser. It may be used to implement further actions with the +parsed message.

+ +
Arguments
+ + + + + + +
TRequestStatus& aStatusThe request status of the active object.
+ +
Return value
+ + + + + +
void
+ +
Example
+ +

This code fragment illustrates how the message process stage +of the parser is called:

+ +
+

iParser->ProcessL(iStatus)

+
+ +

This interface currently returns after issuing a +User::RequestComplete(iReport, KErrNotSupported).

+ +
+ +

 

+ +