wvuing/wvuieng/EngSrc/CCAMessageCreator.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Creator class for messages.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CCAMESSAGECREATOR_H
       
    20 #define CCAMESSAGECREATOR_H
       
    21 
       
    22 #include "MCAMessageCreator.h"
       
    23 
       
    24 //	FORWARD CLASS DECLERATIONS
       
    25 class MCABufferMemoryHandler;
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30  *  Creator class for messages.
       
    31  *
       
    32  *  @lib CAEngine.dll
       
    33  *  @since 3.0
       
    34  */
       
    35 
       
    36 class CCAMessageCreator : public CBase, public MCAMessageCreator
       
    37     {
       
    38     public: // Construction
       
    39 
       
    40         /**
       
    41          * Construction
       
    42          * @param aMemoryHandler Handles memory
       
    43          * @return Pointer to new created instance of CCAMessageCreator
       
    44          */
       
    45         static CCAMessageCreator* NewL();
       
    46 
       
    47         /**
       
    48          * Construction
       
    49          * @param aMemoryHandler Handles memory
       
    50          * @return Pointer to new created instance of CCAMessageCreator
       
    51          */
       
    52         static CCAMessageCreator* NewLC();
       
    53 
       
    54         /**
       
    55          * Destruction
       
    56          */
       
    57         ~CCAMessageCreator();
       
    58 
       
    59     private: // Construction
       
    60 
       
    61         /**
       
    62          * Constructor
       
    63          */
       
    64         CCAMessageCreator();
       
    65 
       
    66     private: // From MCAMessageCreator
       
    67 
       
    68         /**
       
    69          * @see MCAMessageCreator
       
    70          */
       
    71         MCAMessage* CreateMessageL( const SMessageData& aData ) const;
       
    72 
       
    73         /**
       
    74          * @see MCAMessageCreator
       
    75          */
       
    76         MCAMessage* CreateFailedMessageL( const MCAMessage* pSource ) const;
       
    77 
       
    78         /**
       
    79          * @see MCAMessageCreator
       
    80          */
       
    81         MCAMessage* CreateSystemMessageL( MCAMessage::TSystemMessage aType,
       
    82                                           const TDesC& aText ) const;
       
    83 
       
    84         /**
       
    85          * @see MCAMessageCreator
       
    86          */
       
    87         MCAMessage* CloneMessageL( const MCAMessage* pSource ) const;
       
    88 
       
    89     private: // New helper methods
       
    90 
       
    91         /**
       
    92          * Create text message.
       
    93          * @param aData Data for message.
       
    94          * @return new MCAMessage. Ownership is passed to caller
       
    95          */
       
    96         MCAMessage* CreateTextMessageL( const SMessageData& aData ) const;
       
    97 
       
    98         /**
       
    99          * Create content message.
       
   100          * @param aData Data for message.
       
   101          * @return new MCAMessage. Ownership is passed to caller
       
   102          */
       
   103         MCAMessage* CreateContentMessageL( const SMessageData& aData ) const;
       
   104 
       
   105         /**
       
   106          * Create failed text message.
       
   107          * @param pSource. Message base for failed message
       
   108          * @return new MCAMessage. Ownership is passed to caller
       
   109          */
       
   110         MCAMessage* CreateFailedTextMessageL( const MCAMessage* pSource ) const;
       
   111 
       
   112         /**
       
   113          * Resolve right type for message
       
   114          */
       
   115         void ResolveMessageType( MCAMessage* aMessage ) const;
       
   116 
       
   117     private: // Member data
       
   118 
       
   119     };
       
   120 
       
   121 #endif      // CCAMESSAGECREATOR_H
       
   122 
       
   123 // End of File