webservices/wsmessages/inc/senmessagebase.h
changeset 0 62f9d29f7211
equal deleted inserted replaced
-1:000000000000 0:62f9d29f7211
       
     1 /*
       
     2 * Copyright (c) 2006 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:        Simplest concrete base class in WSF message class hierarchy.
       
    15 *                This is not a public class.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 #ifndef SEN_MESSAGE_BASE_H
       
    27 #define SEN_MESSAGE_BASE_H
       
    28 
       
    29 #include <e32std.h>
       
    30 
       
    31 #include <MSenMessage.h>
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class CSenChunk;
       
    35 class CSenXmlReader;
       
    36 class MSenProperties;
       
    37 class MSenMessageContext;
       
    38 
       
    39 // CLASS DECLARATION
       
    40 /**
       
    41 * This is abstract interface defines set of WSF message classes, providing 
       
    42 * convenience for other components, which typically cast this to some 
       
    43 * subclass via IsSafeToCast() method.
       
    44 * @lib SenMessages.lib
       
    45 * @since Series60 4.0
       
    46 */
       
    47 class CSenMessageBase : public CBase, public MSenMessage
       
    48     {
       
    49     public:
       
    50         IMPORT_C static CSenMessageBase* NewL(CSenChunk& aChunk);
       
    51         IMPORT_C static CSenMessageBase* NewLC(CSenChunk& aChunk);
       
    52         
       
    53         // Destructor 
       
    54         IMPORT_C virtual ~CSenMessageBase();
       
    55         
       
    56         // New methods
       
    57         virtual TClass Type();
       
    58         virtual TDirection Direction();
       
    59         virtual TInt SetContext(MSenMessageContext* apOwnedContext);
       
    60         virtual MSenMessageContext* Context();
       
    61         virtual TInt SetProperties(MSenProperties* apOwnedProperties);
       
    62         virtual MSenProperties* Properties();
       
    63         
       
    64         virtual TBool IsSafeToCast(TClass aType);
       
    65         virtual TInt TxnId();
       
    66         virtual MSenMessage* CloneL();
       
    67         
       
    68       
       
    69     protected:
       
    70         IMPORT_C void BaseConstructL();
       
    71     private:
       
    72         // C++ constructor
       
    73         IMPORT_C CSenMessageBase(CSenChunk& aChunk);
       
    74         
       
    75     protected: // Data
       
    76         CSenChunk& iChunk;
       
    77         MSenProperties* ipProperties; // owned
       
    78         TInt iTxnId;
       
    79         TPtrC8 iSerializedMessage;
       
    80         TPtrC8 iSerializedProperties;
       
    81         MSenMessageContext* ipContext; // NOT owned
       
    82     };
       
    83 
       
    84 #endif // SEN_MESSAGE_BASE_H
       
    85 
       
    86 // End of File
       
    87 
       
    88