cbsatplugin/atmisccmdplugin/inc/cnumcommandhandler.h
branchRCL_3
changeset 16 b23265fb36da
child 32 19bd632b5100
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cbsatplugin/atmisccmdplugin/inc/cnumcommandhandler.h	Tue Apr 27 16:49:44 2010 +0300
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ * Description : CCNUMCommandHandler class declaration for AT+CNUM command 
+ *
+ */
+
+#ifndef CNUMCOMMANDHANDLER_H
+#define CNUMCOMMANDHANDLER_H
+
+#include "atmisccmdplugin.h"
+
+/**
+ *  This class implements an AO for AT+CPIN command using ATExt plugin framework.
+ */
+NONSHARABLE_CLASS( CCNUMCommandHandler ) : public CATCmdAsyncBase
+{
+public:
+    /**
+     * @param aCallback is used to notfiy ATExt server to complete the AT command request.
+     */
+    static CCNUMCommandHandler* NewL(MATMiscCmdPlugin* aCallback, TAtCommandParser& aATCmdParser,
+                                    RMobilePhone& aPhone, RTelServer& aTelServer);
+    ~CCNUMCommandHandler();
+
+private:
+    // methods inherited from CActive
+    virtual void RunL();
+    virtual void DoCancel();
+    // RunError is not required because RunL doesn't leave.
+
+    // inherited from CATCmdAsyncBase
+    /**
+     *  @see CATCmdAsyncBase::HandleCommand
+     */
+    virtual void HandleCommand( const TDesC8& aCmd, RBuf8& aReply, TBool aReplyNeeded );
+    /**
+     *  @see CATCmdAsyncBase::HandleCommandCancel
+     */
+    virtual void HandleCommandCancel();
+
+    CCNUMCommandHandler(MATMiscCmdPlugin* aCallback, TAtCommandParser& aATCmdParser,
+                       RMobilePhone& aPhone, RTelServer& aTelServer);
+    void ConstructL();
+
+private:
+    enum TATNumState
+        {
+        EATNumGetStoreInfo,
+        EATNumReadNumber
+        };
+    
+    RTelServer& iTelServer;
+    TInt iPendingEvent;
+    
+    RMobileONStore iOwnNumberStore;
+    RMobileONStore::TMobileONStoreInfoV1 iOwnStoreInfo;
+    RMobileONStore::TMobileONStoreInfoV1Pckg iOwnStoreInfoPckg;
+    RMobileONStore::TMobileONEntryV1 iOwnNumberEntry;
+    RMobileONStore::TMobileONEntryV1Pckg iOwnNumberEntryPckg;
+    RBuf8 iReplyBuffer;
+};
+
+#endif /* CNUMCOMMANDHANDLER_H */