cbsatplugin/atmisccmdplugin/inc/cnumcommandhandler.h
branchRCL_3
changeset 16 b23265fb36da
child 32 19bd632b5100
equal deleted inserted replaced
14:f7fbeaeb166a 16:b23265fb36da
       
     1 /*
       
     2  * Copyright (c) 2010 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  * Initial Contributors:
       
     9  * Nokia Corporation - initial contribution.
       
    10  *
       
    11  * Contributors:
       
    12  * Description : CCNUMCommandHandler class declaration for AT+CNUM command 
       
    13  *
       
    14  */
       
    15 
       
    16 #ifndef CNUMCOMMANDHANDLER_H
       
    17 #define CNUMCOMMANDHANDLER_H
       
    18 
       
    19 #include "atmisccmdplugin.h"
       
    20 
       
    21 /**
       
    22  *  This class implements an AO for AT+CPIN command using ATExt plugin framework.
       
    23  */
       
    24 NONSHARABLE_CLASS( CCNUMCommandHandler ) : public CATCmdAsyncBase
       
    25 {
       
    26 public:
       
    27     /**
       
    28      * @param aCallback is used to notfiy ATExt server to complete the AT command request.
       
    29      */
       
    30     static CCNUMCommandHandler* NewL(MATMiscCmdPlugin* aCallback, TAtCommandParser& aATCmdParser,
       
    31                                     RMobilePhone& aPhone, RTelServer& aTelServer);
       
    32     ~CCNUMCommandHandler();
       
    33 
       
    34 private:
       
    35     // methods inherited from CActive
       
    36     virtual void RunL();
       
    37     virtual void DoCancel();
       
    38     // RunError is not required because RunL doesn't leave.
       
    39 
       
    40     // inherited from CATCmdAsyncBase
       
    41     /**
       
    42      *  @see CATCmdAsyncBase::HandleCommand
       
    43      */
       
    44     virtual void HandleCommand( const TDesC8& aCmd, RBuf8& aReply, TBool aReplyNeeded );
       
    45     /**
       
    46      *  @see CATCmdAsyncBase::HandleCommandCancel
       
    47      */
       
    48     virtual void HandleCommandCancel();
       
    49 
       
    50     CCNUMCommandHandler(MATMiscCmdPlugin* aCallback, TAtCommandParser& aATCmdParser,
       
    51                        RMobilePhone& aPhone, RTelServer& aTelServer);
       
    52     void ConstructL();
       
    53 
       
    54 private:
       
    55     enum TATNumState
       
    56         {
       
    57         EATNumGetStoreInfo,
       
    58         EATNumReadNumber
       
    59         };
       
    60     
       
    61     RTelServer& iTelServer;
       
    62     TInt iPendingEvent;
       
    63     
       
    64     RMobileONStore iOwnNumberStore;
       
    65     RMobileONStore::TMobileONStoreInfoV1 iOwnStoreInfo;
       
    66     RMobileONStore::TMobileONStoreInfoV1Pckg iOwnStoreInfoPckg;
       
    67     RMobileONStore::TMobileONEntryV1 iOwnNumberEntry;
       
    68     RMobileONStore::TMobileONEntryV1Pckg iOwnNumberEntryPckg;
       
    69     RBuf8 iReplyBuffer;
       
    70 };
       
    71 
       
    72 #endif /* CNUMCOMMANDHANDLER_H */