pushmtm/Plugins/PushContentHandler/CMultiPartMixedContentHandler.h
changeset 32 92a061761a7b
parent 0 84ad3b177aa3
equal deleted inserted replaced
31:868cceedabd3 32:92a061761a7b
    13 *
    13 *
    14 * Description:  Declaration of CMultiPartMixedContentHandler.
    14 * Description:  Declaration of CMultiPartMixedContentHandler.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
       
    19 
       
    20 #ifndef __CMULTIPARTMIXEDCONTENTHANDLER_H__
    18 #ifndef __CMULTIPARTMIXEDCONTENTHANDLER_H__
    21 #define __CMULTIPARTMIXEDCONTENTHANDLER_H__
    19 #define __CMULTIPARTMIXEDCONTENTHANDLER_H__
    22 
       
    23 
    20 
    24 // INCLUDE FILES
    21 // INCLUDE FILES
    25 
    22 
    26 #include "PushMtmDef.hrh"
    23 #include "PushMtmDef.hrh"
    27 #include "PushContentHandlerDef.hrh"
    24 #include "PushContentHandlerDef.hrh"
    28 #include <CContentHandlerBase.h>
    25 #include <push/ccontenthandlerbase.h>
    29 #include <E32Base.h>
    26 #include <E32Base.h>
    30 
    27 
    31 // CONSTANTS
    28 // CONSTANTS
    32 
    29 
    33 const TUid KUidPushMultiPartMixedContentHandler	= { 
    30 const TUid KUidPushMultiPartMixedContentHandler	= {
    34            EUidPushMultiPartMixedContentHandler };
    31            EUidPushMultiPartMixedContentHandler };
    35 _LIT(KMultiPartMixedContentHandlerData, 
    32 _LIT(KMultiPartMixedContentHandlerData,
    36      "application/vnd.wap.multipart.mixed||multipart/mixed");
    33      "application/vnd.wap.multipart.mixed||multipart/mixed");
    37 
    34 
    38 // FORWARD DECLARATIONS
    35 // FORWARD DECLARATIONS
    39 
    36 
    40 class CMultipartIteratorBase;
    37 class CMultipartIteratorBase;
    41 
    38 
    42 // CLASS DECLARATION
    39 // CLASS DECLARATION
    43 
    40 
    44 /**
    41 /**
    45 * The MultiPart/Mixed Content Handler 
    42 * The MultiPart/Mixed Content Handler
    46 *
    43 *
    47 * Takes apart the mulitpart message, creating a new sub message from each 
    44 * Takes apart the mulitpart message, creating a new sub message from each
    48 * part, then calls on new Push Handlers to process each sub message.
    45 * part, then calls on new Push Handlers to process each sub message.
    49 *
    46 *
    50 * All multipart/mixed messages are dropped if __TEST_MULTIPART_MIX_SUPP 
    47 * All multipart/mixed messages are dropped if __TEST_MULTIPART_MIX_SUPP
    51 * is not defined.
    48 * is not defined.
    52 */ 
    49 */
    53 class CMultiPartMixedContentHandler : public CContentHandlerBase
    50 class CMultiPartMixedContentHandler : public CContentHandlerBase
    54 	{
    51 	{
    55     public: // Constructors and destructor
    52     public: // Constructors and destructor
    56 
    53 
    57 	    static CMultiPartMixedContentHandler* NewL();
    54 	    static CMultiPartMixedContentHandler* NewL();
    75 	    void NextPartL();
    72 	    void NextPartL();
    76 
    73 
    77 #endif // __TEST_MULTIPART_MIX_SUPP
    74 #endif // __TEST_MULTIPART_MIX_SUPP
    78 
    75 
    79     private:	// Methods from CPushHandlerBase
    76     private:	// Methods from CPushHandlerBase
    80 	    
    77 
    81 	    void HandleMessageL(CPushMessage* aPushMsg, TRequestStatus& aStatus);
    78 	    void HandleMessageL(CPushMessage* aPushMsg, TRequestStatus& aStatus);
    82 
    79 
    83 	    void HandleMessageL(CPushMessage* aPushMsg);
    80 	    void HandleMessageL(CPushMessage* aPushMsg);
    84 
    81 
    85 	    void CancelHandleMessage();
    82 	    void CancelHandleMessage();
    98 
    95 
    99     private:	// Attributes
    96     private:	// Attributes
   100 
    97 
   101 	    enum TState
    98 	    enum TState
   102             {
    99             {
   103             ELoadMsgData, 
   100             ELoadMsgData,
   104             EHandlePart, 
   101             EHandlePart,
   105             ENextPart, 
   102             ENextPart,
   106             EDone
   103             EDone
   107             };
   104             };
   108 
   105 
   109 	    CMultipartIteratorBase*		iMultiMessage;
   106 	    CMultipartIteratorBase*		iMultiMessage;
   110 
   107 
   111 	    CContentHandlerBase*		iContentHandler;
   108 	    CContentHandlerBase*		iContentHandler;
   112 	    
   109 
   113 	};
   110 	};
   114 
   111 
   115 
   112 
   116 #endif	// __CMULTIPARTMIXEDCONTENTHANDLER_H__
   113 #endif	// __CMULTIPARTMIXEDCONTENTHANDLER_H__