cbsref/telephonyrefplugins/atltsy/atcommand/callcontrol/inc/athangupcommandrecords.h
branchRCL_3
changeset 65 630d2f34d719
equal deleted inserted replaced
61:17af172ffa5f 65:630d2f34d719
       
     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 // Record the infomation related to hangup commands
       
    15 
       
    16 #ifndef ATHANGUPCOMMANDRECORDS_H_
       
    17 #define ATHANGUPCOMMANDRECORDS_H_
       
    18 
       
    19 //system include
       
    20 #include <e32base.h>
       
    21 #include <e32cmn.h> 
       
    22 
       
    23 /**
       
    24  * Hand up command information
       
    25  * 
       
    26  */
       
    27 class TATHanupCommandInfo
       
    28 	{
       
    29 public:
       
    30 	TATHanupCommandInfo();
       
    31 	TInt iCallId;
       
    32 	TInt iHangupCause;
       
    33 	};
       
    34 
       
    35 /**
       
    36  * Hang up command information records
       
    37  */
       
    38 class CATHangupCommandRecords : public CBase
       
    39 	{
       
    40 public:
       
    41 	
       
    42 	/**
       
    43 	 * Factory fucntion
       
    44 	 */
       
    45 	static CATHangupCommandRecords* NewL();
       
    46 	
       
    47 	/**
       
    48 	 * Factory function
       
    49 	 * 
       
    50 	 */
       
    51 	static CATHangupCommandRecords* NewLC();
       
    52 	
       
    53 	/**
       
    54 	 * Destructor
       
    55 	 * 
       
    56 	 */
       
    57 	virtual ~CATHangupCommandRecords();
       
    58 	
       
    59 	/**
       
    60 	 * Add hanup information
       
    61 	 */
       
    62 	TInt AddHangupCommandInfo(TInt aCallId, TInt aHangupCase);
       
    63 	
       
    64 	/**
       
    65 	 * KErrNone get command info
       
    66 	 * KErrNotFound not get command info
       
    67 	 * and then remove this info from the array
       
    68 	 */
       
    69 	TInt GetFirstHangupCommandInfoAndRemoveIt(TATHanupCommandInfo& aInfo);
       
    70 	
       
    71 	/**
       
    72 	 * Mark there is one hanup active command
       
    73 	 */
       
    74 	void SetHangupActiveFlag(TBool aIsActive);
       
    75 	
       
    76 	/**
       
    77 	 * Retrieve the flag of current hangup command
       
    78 	 *
       
    79 	 * @return The ETrue if there is one acitve hangup command active, EFalase otherwise
       
    80 	 */
       
    81 	TBool GetHangupActiveFlag() const;
       
    82 	
       
    83 	/**
       
    84 	 * Check if there are any hangup command in this store
       
    85 	 */
       
    86 	TBool IsHaveRecords() const;
       
    87 	
       
    88 protected:
       
    89 	
       
    90 	/**
       
    91 	 * Constructor
       
    92 	 */
       
    93 	CATHangupCommandRecords();
       
    94 	
       
    95 	/**
       
    96 	 * 2nd structor
       
    97 	 */
       
    98 	void ConstructL();
       
    99 	
       
   100 private:
       
   101 	/**
       
   102 	 * Flag of active hangup command 
       
   103 	 */
       
   104 	TBool iHangupActive;
       
   105 	
       
   106 	/**
       
   107 	 * Store the hangup command info
       
   108 	 */
       
   109 	RArray<TATHanupCommandInfo> iHangupInfoArray;
       
   110 	};
       
   111 
       
   112 #endif /*ATHANGUPCOMMANDRECORDS_H_*/