00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include <e32base.h>
00018
00019 #include "client_api.h"
00020 #include "session.h"
00021
00022 const TUid KAppUid = { 0xE1111556 };
00023
00024 static void callExampleL();
00025
00026 extern TInt E32Main()
00027 {
00028 __UHEAP_MARK;
00029 CTrapCleanup* cleanup=CTrapCleanup::New();
00030
00031 TRAPD(error,callExampleL());
00032 _LIT(KTxtTrainingTest,"TrainingApp");
00033 __ASSERT_ALWAYS(!error,User::Panic(KTxtTrainingTest,error));
00034 delete cleanup;
00035 __UHEAP_MARKEND;
00036 return KErrNone;
00037 }
00038
00039 static void callExampleL()
00040 {
00041 RServAppService exampleSess;
00042
00043 _LIT(KHelloWorld,"Hello World!");
00044
00045 TBufC<12> exampleBuf(KHelloWorld);
00046
00047 exampleSess.ConnectNewAppL(KAppUid);
00048 exampleSess.Send(exampleBuf);
00049 exampleSess.Close();
00050 }