BIOexampleParser.cpp
上传用户:sempras
上传日期:2007-03-04
资源大小:821k
文件大小:4k
源码类别:

Symbian

开发平台:

C/C++

  1. /*
  2.         BIOexampleParser.CPP - source file for BIOexampleParser
  3.         C++ implementation
  4. */
  5. //  Include Files
  6. #include <e32std.h>                 // for GLDEF_C
  7. #include <eikenv.h>                 // for eikenv
  8. #include "Bioexampleparser.h"       // own header
  9. // Constants
  10. //
  11. //  CBIOexampleParser
  12. //
  13. /*
  14. -------------------------------------------------------------------------------
  15.     CBIOexampleParser
  16.     Description: Constructor
  17.     Return value: N/A
  18. -------------------------------------------------------------------------------
  19. */
  20. CBIOexampleParser::CBIOexampleParser(CRegisteredParserDll& aRegisteredParserDll, CMsvServerEntry& aEntry, RFs& aFs):
  21.                                 CBaseScriptParser(aRegisteredParserDll, aEntry, aFs)
  22.     {
  23.     }
  24. /*
  25. -------------------------------------------------------------------------------
  26.     ~CBIOexampleParser
  27.     Description: Destructor
  28.     Return value: N/A
  29. -------------------------------------------------------------------------------
  30. */
  31. CBIOexampleParser::~CBIOexampleParser()
  32. {
  33. Cancel();
  34. }
  35. /*
  36. -------------------------------------------------------------------------------
  37.     NewL();
  38.     Description: Creates a new instance of this class
  39.     Return value: CBIOexampleAppUi*
  40. -------------------------------------------------------------------------------
  41. */
  42. EXPORT_C CBIOexampleParser* CBIOexampleParser::NewL(CRegisteredParserDll& aRegisteredParserDll, CMsvServerEntry& aEntry, RFs& aFs)
  43. {
  44.     CBIOexampleParser* self = new(ELeave) CBIOexampleParser(aRegisteredParserDll, aEntry, aFs);
  45.     CleanupStack::PushL(self);
  46.     self->ConstructL();
  47.     CleanupStack::Pop();
  48.     return self;
  49. }
  50. /*
  51. -------------------------------------------------------------------------------
  52.     ConstructL();
  53.     Description: 2nd phase Constructor
  54.     Return value: N/A
  55. -------------------------------------------------------------------------------
  56. */
  57. void CBIOexampleParser::ConstructL()
  58. {
  59. CActiveScheduler::Add(this);
  60. }
  61. /*
  62. -------------------------------------------------------------------------------
  63.     ParseL();
  64.     Description: Parsing the message. After parsing set the flag iMtmData3 to 1
  65.     ( means that message has been parsed ).
  66.     Return value: N/A
  67. -------------------------------------------------------------------------------
  68. */
  69. void CBIOexampleParser::ParseL(TRequestStatus& aStatus, const TDesC& /*aSms*/)
  70. {
  71. aStatus = iStatus;
  72. SetActive();
  73. TMsvEntry entry = iEntry.Entry();
  74. entry.iMtmData3 = 1;
  75. iEntry.ChangeEntry(entry);
  76. TRequestStatus* status = &aStatus ;
  77. User::RequestComplete(status, KErrNone);
  78.     // could read and delete the message from server.
  79. }
  80. /*
  81. -------------------------------------------------------------------------------
  82.     ProcessL();
  83.     Description: Processing the message.
  84.     Return value: N/A
  85. -------------------------------------------------------------------------------
  86. */
  87. void CBIOexampleParser::ProcessL(TRequestStatus& aStatus)
  88. {
  89. aStatus = iStatus;
  90. SetActive();
  91. TRequestStatus* status = &iStatus;
  92. User::RequestComplete(status, KErrNone);
  93. }
  94. /*
  95. -------------------------------------------------------------------------------
  96.     DoCancel();
  97.     Description: Cancel request.
  98.     Return value: N/A
  99. -------------------------------------------------------------------------------
  100. */
  101. void CBIOexampleParser::DoCancel()
  102. {
  103. TRequestStatus* status = &iStatus;
  104. User::RequestComplete(status, KErrCancel);
  105. }
  106. /*
  107. -------------------------------------------------------------------------------
  108.     RunL();
  109.     Description: 
  110.     Return value: N/A
  111. -------------------------------------------------------------------------------
  112. */
  113. void CBIOexampleParser::RunL()
  114. {
  115. }
  116. /*
  117. -----------------------------------------------------------------------------
  118.     E32Dll
  119.     Called when the DLL is loaded and unloaded.
  120.     Return Values:  KErrNone
  121. -----------------------------------------------------------------------------
  122. */
  123. GLDEF_C TInt E32Dll(TDllReason/* aReason*/)    
  124.     {
  125.     return (KErrNone);
  126.     }
  127. //End of File