adaptationlayer/modematadaptation/modematcontroller_exe/inc/catmessage.h
changeset 0 63b37f68c1ce
child 8 6295dc2169f3
equal deleted inserted replaced
-1:000000000000 0:63b37f68c1ce
       
     1 /*
       
     2 * Copyright (c) 2009 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 the License "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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CATMESSAGE_H
       
    21 #define CATMESSAGE_H
       
    22 
       
    23 class CModemAtSession;
       
    24 
       
    25 /**
       
    26   * CAtMessage is used, when sending data from session to CModemAtHandler. CAtMessage stores
       
    27   * message data. Class is used by CModemAtSession. 
       
    28   */
       
    29 class CAtMessage  : public CBase
       
    30     {
       
    31 public:    
       
    32     
       
    33     /** Constructor.
       
    34      * @param aMessagetype AT-command or NVRAM-status
       
    35      * @param aCmd AT-command
       
    36      */
       
    37     CAtMessage( const TUint8 aMessageType, CModemAtSession* aSession, const RMessage2& aRequest );
       
    38     
       
    39     /** Destructor.
       
    40      *
       
    41      */
       
    42     ~CAtMessage();
       
    43     
       
    44     /** GetBuffer
       
    45      * @return Pointer to the buffer
       
    46      */
       
    47     TPtr8 GetBuffer();
       
    48     
       
    49     /** GetMessageType
       
    50      * @return messagetype
       
    51      */
       
    52     TUint8 GetMessageType();
       
    53 
       
    54     /** ReceiveATResponse
       
    55      * @param aResponse Response to AT-command
       
    56      * @param aComplete Intermediate data is not completed until it has a response. AT command is completed.
       
    57      * @return
       
    58      */
       
    59     void ReceiveATResponse( const TDesC8& aResponse, TBool aComplete );
       
    60 	  
       
    61 	  /** CancelRequest
       
    62      * 
       
    63      */
       
    64 	  void CancelRequest();
       
    65 	  
       
    66 	  /** GetSession
       
    67      * @return RMessage2 session pointer
       
    68      */
       
    69     CModemAtSession* GetSession();
       
    70 
       
    71     /** IsRequestActive
       
    72      * @return ETrue if request is not NULL, EFalse otherwise
       
    73      */
       
    74     TBool IsRequestActive();
       
    75 
       
    76 private:    
       
    77     HBufC8* iMessage;
       
    78     TUint8 iMessageType;
       
    79     CModemAtSession* iSession;
       
    80     RMessage2 iRequest;
       
    81     TPtr8 iMessagePtr;
       
    82     };
       
    83 
       
    84 #endif // CATMESSAGE_H
       
    85