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
.
Click on the following link to download the example: Biomsgexample.zip
Click: browse to view the example code.
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
CRegisteredParserDll
CBIODatabase
CMsvStore
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.
CBaseScriptParser2
The BIOMessageMgr
example code includes
the following project files for building the application: BIOParser.mmp
, BIOMessage.mmp
and bld.inf
.
The Symbian 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.
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.