Symbian Security Studio

About symbian software programming ,security analysis and other things about symbian.

Thursday, November 1, 2007

BIO Message Manager in Messaging example code

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.


--------------------------------------------------------------------------------

BIOMessage: BIO messaging using the message server
Found in examples\messaging\BIOMessageMgr\.


--------------------------------------------------------------------------------

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
Found in examples\messaging\BIOMessageMgr\.


--------------------------------------------------------------------------------

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
CRegisteredParserDll
CMsvEntry



--------------------------------------------------------------------------------

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\ , 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\\\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.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home