cbsref/telephonyrefplugins/atltsy/atcommand/phonebook/inc/atphbkstoredelete.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 // @file atphbkstoredelete.h
       
    15 // This contains CAtPhbkStoreDelete which is used to delete a phonebook Entry
       
    16 // 
       
    17 
       
    18 #ifndef ATPHBKSTOREDELETE_H
       
    19 #define ATPHBKSTOREDELETE_H
       
    20 
       
    21 //system include 
       
    22 #include <e32std.h>
       
    23 #include <e32base.h>
       
    24 
       
    25 //user include 
       
    26 #include "atcommandbase.h"
       
    27 
       
    28 /**
       
    29  * CAtPhbkStoreDelete
       
    30  *
       
    31  */
       
    32 class CAtPhbkStoreDelete : public CAtCommandBase
       
    33 	{
       
    34 public:
       
    35 	/**
       
    36 	* Destructor
       
    37 	*
       
    38 	*/
       
    39 	~CAtPhbkStoreDelete();
       
    40 	
       
    41 	/**
       
    42 	*  static NewL  
       
    43 	*
       
    44 	* @param aGloblePhone
       
    45 	* @param aCtsyDispatcherCallback
       
    46 	*/
       
    47 	static CAtPhbkStoreDelete* NewL(CGlobalPhonemanager& aGloblePhone, 
       
    48                                     CCtsyDispatcherCallback& aCtsyDispatcherCallback);
       
    49 	
       
    50 	/**
       
    51 	*  static NewLC  
       
    52 	*
       
    53 	* @param aGloblePhone
       
    54 	* @param aCtsyDispatcherCallback
       
    55 	*/
       
    56 	static CAtPhbkStoreDelete* NewLC(CGlobalPhonemanager& aGloblePhone, 
       
    57                                      CCtsyDispatcherCallback& aCtsyDispatcherCallback);
       
    58 
       
    59 	/**
       
    60 	* Virtual function. Inherited from CAtCommandBase
       
    61 	*  Start Execute AT Command
       
    62 	*/
       
    63 	virtual void ExecuteCommand();
       
    64 	
       
    65 	/**
       
    66 	* Will be called by AT Manager whenever a event was triggered
       
    67 	* 
       
    68 	* @param aEventSource
       
    69 	* @param aStatus
       
    70 	*/
       
    71 	virtual void EventSignal(TAtEventSource aEventSource, TInt aStatus);
       
    72 	
       
    73 	/**
       
    74 	* Virtual function. Inherited from CAtCommandBase
       
    75 	* 
       
    76 	* @param aResponseBuf Line buf reading from baseband 
       
    77 	*/
       
    78 	virtual void ParseResponseL(const TDesC8& aResponseBuf);
       
    79 	
       
    80 	/**
       
    81 	* Start this request
       
    82 	* 
       
    83 	*/
       
    84 	void StartRequest();
       
    85 	
       
    86 	/**
       
    87 	* Set Phonebook Type 
       
    88 	* 
       
    89 	* @param  aPhonebookType
       
    90 	*/
       
    91 	void SetPhonebookType(DispatcherPhonebook::TPhonebook aPhonebookType);
       
    92 	
       
    93 	/**
       
    94 	* Set Phonebook Index should be deleted
       
    95 	* 
       
    96 	* @param  aIndex
       
    97 	*/
       
    98 	void SetDeleteIndex(TInt aIndex);
       
    99 protected:
       
   100 	/**
       
   101 	* Constructor
       
   102 	*
       
   103 	* @param aGloblePhone
       
   104 	* @param aCtsyDispatcherCallback
       
   105 	*/
       
   106 	CAtPhbkStoreDelete(CGlobalPhonemanager& aGloblePhone, 
       
   107                        CCtsyDispatcherCallback& aCtsyDispatcherCallback);
       
   108 	
       
   109 	/**
       
   110 	* 2nd Constructor
       
   111 	*/
       
   112 	void ConstructL();
       
   113 private:
       
   114 	/**
       
   115 	*  Executer AT command for Deleting an Entry
       
   116 	*/
       
   117 	void DeleteEntry();
       
   118 	
       
   119 	/**
       
   120 	* Get the maximum number length for each phonebook store type
       
   121 	*/
       
   122 	void GetMaxNumberLen();
       
   123 private:	
       
   124 	/**
       
   125 	*  save PhoneBookType by SetPhonebookType
       
   126 	*/	
       
   127 	DispatcherPhonebook::TPhonebook iPhoneBookType;
       
   128 	
       
   129 	/**
       
   130 	*  state machine for EventSignal 
       
   131 	*/
       
   132 	enum 
       
   133 		{
       
   134 		ESetStoreName,
       
   135 		ESetStoreNameComplete,
       
   136 		EDeleteEntry,
       
   137 		EDeleteEntryComplete,
       
   138 		EATNotInProgress
       
   139 		}iState;
       
   140 		
       
   141 	/**
       
   142 	* The return error value of AT command executed 
       
   143 	*/		
       
   144 	TInt iError;	
       
   145 	
       
   146 	/**
       
   147 	*  The index phonebook Entry should be deleted
       
   148 	*/
       
   149 	TInt iIndex;
       
   150 	
       
   151 	/**
       
   152 	* the maximum number length 
       
   153 	*/
       
   154 	TInt iMaxLen;
       
   155 	
       
   156 	}; // class AtPhbkStoreDelete
       
   157 #endif // ATPHBKSTOREDELETE_H