cbsref/telephonyrefplugins/atltsy/atcommand/sms/inc/atsmsack.h
changeset 49 f50f4094acd7
equal deleted inserted replaced
48:14460bf2a402 49:f50f4094acd7
       
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // @file atsmsack.h
       
    15 // This contains CAtSmsAck and CAtSmsNack which is used to send 
       
    16 // positive(negative) acknowledgment
       
    17 // 
       
    18 
       
    19 #ifndef ATSMSACK_H
       
    20 #define ATSMSACK_H
       
    21 
       
    22 //system include 
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 
       
    26 //user include 
       
    27 #include "atcommandbase.h"
       
    28 
       
    29 // CLASS DECLARATION
       
    30 class CAtSmsAck : public CAtCommandBase
       
    31 	{
       
    32 public:
       
    33 	/**
       
    34 	* Destructor
       
    35 	*
       
    36 	*/
       
    37 	~CAtSmsAck();
       
    38 	
       
    39 	/**
       
    40 	*  static NewL  
       
    41 	*
       
    42 	* @param aGloblePhone
       
    43 	* @param aCtsyDispatcherCallback
       
    44 	*/
       
    45 	static CAtSmsAck* NewL(CGlobalPhonemanager& aGloblePhone, 
       
    46                            CCtsyDispatcherCallback& aCtsyDispatcherCallback);
       
    47 	
       
    48 	/**
       
    49 	*  static NewLC  
       
    50 	*
       
    51 	* @param aGloblePhone
       
    52 	* @param aCtsyDispatcherCallback
       
    53 	*/
       
    54 	static CAtSmsAck* NewLC(CGlobalPhonemanager& aGloblePhone, 
       
    55                             CCtsyDispatcherCallback& aCtsyDispatcherCallback);
       
    56 	
       
    57 	/**
       
    58 	* Virtual function. Inherited from CAtCommandBase
       
    59 	*  Start Execute AT Command
       
    60 	*/
       
    61 	virtual void ExecuteCommand();
       
    62 	
       
    63 	/**
       
    64 	* Will be called by AT Manager whenever a event was triggered
       
    65 	* 
       
    66 	* @param aEventSource
       
    67 	* @param aStatus
       
    68 	*/
       
    69 	virtual void EventSignal(TAtEventSource aEventSource, TInt aStatus);
       
    70 	
       
    71 	/**
       
    72 	* Virtual function. Inherited from CAtCommandBase
       
    73 	* 
       
    74 	* @param aResponseBuf Line buf reading from baseband 
       
    75 	*/
       
    76 	virtual void ParseResponseL(const TDesC8& aResponseBuf);
       
    77 	
       
    78 	/**
       
    79 	* Start this request
       
    80 	* 
       
    81 	*/
       
    82 	void StartRequest();
       
    83 protected:
       
    84 	/**
       
    85 	* Constructor
       
    86 	*
       
    87 	* @param aGloblePhone
       
    88 	* @param aCtsyDispatcherCallback
       
    89 	*/
       
    90 	CAtSmsAck(CGlobalPhonemanager& aGloblePhone, 
       
    91               CCtsyDispatcherCallback& aCtsyDispatcherCallback);
       
    92 	
       
    93 	/**
       
    94 	* 2nd Constructor
       
    95 	*/
       
    96 	void ConstructL();
       
    97 private:
       
    98 	/**
       
    99 	* The return error value of AT command executed 
       
   100 	*/
       
   101 	TInt iError;	
       
   102 	}; // class CAtSmsAck
       
   103 
       
   104 class CAtSmsNack : public CAtCommandBase
       
   105 	{
       
   106 public:
       
   107 	/**
       
   108 	* Destructor
       
   109 	*
       
   110 	*/
       
   111 	~CAtSmsNack();
       
   112 	
       
   113 	/**
       
   114 	*  static NewL  
       
   115 	*
       
   116 	* @param aGloblePhone
       
   117 	* @param aCtsyDispatcherCallback
       
   118 	*/
       
   119 	static CAtSmsNack* NewL(CGlobalPhonemanager& aGloblePhone, 
       
   120                             CCtsyDispatcherCallback& aCtsyDispatcherCallback);
       
   121 	
       
   122 	/**
       
   123 	*  static NewLC  
       
   124 	*
       
   125 	* @param aGloblePhone
       
   126 	* @param aCtsyDispatcherCallback
       
   127 	*/
       
   128 	static CAtSmsNack* NewLC(CGlobalPhonemanager& aGloblePhone, 
       
   129                              CCtsyDispatcherCallback& aCtsyDispatcherCallback);
       
   130 	
       
   131 	/**
       
   132 	* Virtual function. Inherited from CAtCommandBase
       
   133 	*  Start Execute AT Command
       
   134 	*/
       
   135 	virtual void ExecuteCommand();
       
   136 	
       
   137 	/**
       
   138 	* Will be called by AT Manager whenever a event was triggered
       
   139 	* 
       
   140 	* @param aEventSource
       
   141 	* @param aStatus
       
   142 	*/
       
   143 	virtual void EventSignal(TAtEventSource aEventSource, TInt aStatus);
       
   144 	
       
   145 	/**
       
   146 	* Virtual function. Inherited from CAtCommandBase
       
   147 	* 
       
   148 	* @param aResponseBuf Line buf reading from baseband 
       
   149 	*/
       
   150 	virtual void ParseResponseL(const TDesC8& aResponseBuf);
       
   151 	
       
   152 	/**
       
   153 	* Start this request
       
   154 	* 
       
   155 	*/
       
   156 	void StartRequest();
       
   157 	/**
       
   158 	* Set Nack TPDU data
       
   159 	* 
       
   160 	*/
       
   161 	void SetNackTpdu(TPtrC8 aRpError);
       
   162 protected:
       
   163 	/**
       
   164 	* Constructor
       
   165 	*
       
   166 	* @param aGloblePhone
       
   167 	* @param aCtsyDispatcherCallback
       
   168 	*/
       
   169 	CAtSmsNack(CGlobalPhonemanager& aGloblePhone, 
       
   170                CCtsyDispatcherCallback& aCtsyDispatcherCallback);
       
   171 	
       
   172 	/**
       
   173 	* 2nd Constructor
       
   174 	*/
       
   175 	void ConstructL();
       
   176 private:
       
   177     /**
       
   178 	 *  Nack required TPDU data
       
   179 	 */
       
   180 	TBuf8<256> iRpError;
       
   181 	
       
   182 	/**
       
   183 	* The return error value of AT command executed 
       
   184 	*/
       
   185 	TInt iError;	
       
   186 	}; // class CAtSmsNack
       
   187 #endif // ATSMSACK_H