diff -r 000000000000 -r 89d6a7a84779 Symbian3/SDK/Source/GUID-0CBD2728-DB7E-55FF-929A-E5BF279A1B66.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-0CBD2728-DB7E-55FF-929A-E5BF279A1B66.dita Thu Jan 21 18:18:20 2010 +0000 @@ -0,0 +1,76 @@ + + + + + +BIOMessageMgr: +BIO Message manager using the message server +

The BIO Message manager example comprises two projects BIOMessage.exe and BIOParser.dll. +The BIOMessage.exe example connects to the message server, +creates a BIO message and sends the registered parser DLL and message entry +to BIOParser.dll.

+
Download

Click +on the following link to download the example: Biomsgexample.zip

Click: browse to view the example code.

+
BIOMessage: BIO messaging using the message server

Description

This +example code demonstrates BIO messaging using RSendAs and RSendAsMessage and +other supporting classes as mentioned in the Class +Summary below.

The BIOMessage example +code provides the following functionality:

Creating a session

void CBioMessage::Connect();

Creates +a session with the message server using RSendAs.

The +generated console output looks like this:

+ +

Creating a BIO message

void CBioMessage::Create(RSendAsMessage& aMessage);

This function does the following:

    +
  • creates a BIO message +of VCard type

  • +
  • sets the message body +text

  • +
  • adds the message recipients +for the message to be sent.

  • +

The generated console output looks like this:

+ +

Sending the BIO message

void CBioMessage::Send(RSendAsMessage& aMessage);

Sends the message to the recipients.

The generated console output +looks like this:

+ +

Creating the parser

CBioParser::NewL(CMsvEntry* aEntry);

Creates a CBioParser object based on the message entry.

Parsing +the BIO message

CBioParser::ParserL();

This +function does the following:

    +
  • calls ExtractMessageBodyL() to +extract the message body text from CMsvStore, the message +store

  • +
  • finds, loads and maintains +a reference count of client processes for a BIO parser DLL

  • +
  • parses the message body +text.

  • +

The generated console output looks like this:

+ +

Class Summary

RSendAs

RSendAsMessage

CSendAsMessageTypes

CSendAsAccounts

CRegisteredParserDll

CBIODatabase

CMsvStore

+
BIOParser: BIO message parsing

Description

This +example code demonstrates the parsing of the message. CBIOExampleParser is +the wrapper class which uses CBaseScriptParser2 and other +supporting classes mentioned in the Class +Summary below.

The BIOParser example code +provides the following functionality:

Creating the parser

CBIOExampleParser* CBIOExampleParser::NewL(CRegisteredParserDll& aRegisteredParserDll, CMsvEntry& aEntry, RFs& aFs);

Creates a CBIOExampleParser object based on the registered +parser DLL and the message entry.

Parsing the BIO message

void CBIOExampleParser::ParseL();

Parses +the BIO message.

Processing the BIO message

CBIOExampleParser::ProcessL();

Processes +the parsed data.

Class +Summary

CBaseScriptParser2

+
Build

The BIOMessageMgr example +code includes the following project files for building the application: BIOParser.mmp, BIOMessage.mmp and bld.inf.

The Symbian +OS build process describes how to build this application.

In +CodeWarrior: firstly, 'make' the BIOParser.mcp which +creates BIOParser.dll and BIOParser.lib in \epoc32\release\winscw\ <build_variant>, then secondly, make BIOMessage.exe in the same directory. +Run BIOMessage.mcp, which runs BIOMessage.exe thus +launching the emulator.

+
Usage

Launch the target. For emulator targets, +run: \epoc32\release\<wins or winscw>\<urel or udeb>\BIOMessage.exe. +If TechView emulator is used, to run the application go to System menu and +click on Open files / programs window. Start the "BIO Messaging Example" application.

Step +through each phase of the example by pressing the space bar or by tapping +on the window drawn by the example.

+
\ No newline at end of file