cbsatplugin/atmisccmdplugin/inc/cfuncommandhandler.h
author hgs
Mon, 12 Jul 2010 19:13:27 +0300
changeset 44 6d10bd0d821a
parent 32 19bd632b5100
permissions -rw-r--r--
201027
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
26
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
 * All rights reserved.
hgs
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
 * under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
 * which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
 * Initial Contributors:
hgs
parents:
diff changeset
     9
 * Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    10
 *
hgs
parents:
diff changeset
    11
 * Contributors:
hgs
parents:
diff changeset
    12
 * 
hgs
parents:
diff changeset
    13
 * Description :
hgs
parents:
diff changeset
    14
 * 
hgs
parents:
diff changeset
    15
 * CCFUNCommandHandler class declaration for AT+CFUN command
hgs
parents:
diff changeset
    16
 * 
hgs
parents:
diff changeset
    17
 */
hgs
parents:
diff changeset
    18
hgs
parents:
diff changeset
    19
#ifndef CFUNCOMMANDHANDLER_H
hgs
parents:
diff changeset
    20
#define CFUNCOMMANDHANDLER_H
hgs
parents:
diff changeset
    21
32
hgs
parents: 26
diff changeset
    22
#include <e32property.h> 
hgs
parents: 26
diff changeset
    23
hgs
parents: 26
diff changeset
    24
#include "atcmdasyncbase.h"
26
hgs
parents:
diff changeset
    25
hgs
parents:
diff changeset
    26
const TInt KGeneralProfileId = 0;
hgs
parents:
diff changeset
    27
const TInt KOfflineProfileId = 5;
hgs
parents:
diff changeset
    28
hgs
parents:
diff changeset
    29
class MProfileEngine;
hgs
parents:
diff changeset
    30
hgs
parents:
diff changeset
    31
/**
hgs
parents:
diff changeset
    32
 *  AT+CFUN command handler implementation class
hgs
parents:
diff changeset
    33
 */
hgs
parents:
diff changeset
    34
NONSHARABLE_CLASS( CCFUNCommandHandler ) : public CATCmdAsyncBase
hgs
parents:
diff changeset
    35
    {
hgs
parents:
diff changeset
    36
public:
hgs
parents:
diff changeset
    37
    static CCFUNCommandHandler* NewL(MATMiscCmdPlugin* aCallback, TAtCommandParser& aATCmdParser, RMobilePhone& aPhone);
hgs
parents:
diff changeset
    38
    ~CCFUNCommandHandler();
hgs
parents:
diff changeset
    39
    
hgs
parents:
diff changeset
    40
private: // methods from CActive
hgs
parents:
diff changeset
    41
    virtual void RunL();
hgs
parents:
diff changeset
    42
    virtual void DoCancel();
hgs
parents:
diff changeset
    43
    // RunError not needed as RunL does not leave
32
hgs
parents: 26
diff changeset
    44
    
hgs
parents: 26
diff changeset
    45
private: // method from CATCmdAsyncBase::MATCmdBase    
26
hgs
parents:
diff changeset
    46
    virtual void HandleCommand( const TDesC8& aCmd, RBuf8& aReply, TBool aReplyNeeded );
hgs
parents:
diff changeset
    47
    
hgs
parents:
diff changeset
    48
private:
hgs
parents:
diff changeset
    49
    CCFUNCommandHandler(MATMiscCmdPlugin* aCallback, TAtCommandParser& aATCmdParser, RMobilePhone& aPhone);
hgs
parents:
diff changeset
    50
    void ConstructL();
hgs
parents:
diff changeset
    51
    
32
hgs
parents: 26
diff changeset
    52
    TInt ActivateProfile(TInt aFunc);
26
hgs
parents:
diff changeset
    53
    TInt SetActiveProfile(TInt aProfileId);
hgs
parents:
diff changeset
    54
    TInt RestartDevice();
hgs
parents:
diff changeset
    55
    
hgs
parents:
diff changeset
    56
private:
hgs
parents:
diff changeset
    57
    RBuf8 iReply;
hgs
parents:
diff changeset
    58
    
hgs
parents:
diff changeset
    59
    MProfileEngine* iProfileEngine;
32
hgs
parents: 26
diff changeset
    60
    RProperty iProperty;
hgs
parents: 26
diff changeset
    61
    TInt iExpectedState;
hgs
parents: 26
diff changeset
    62
    TInt iReset; // default 0 - do not reset the MT before setting it to <fun> power level
26
hgs
parents:
diff changeset
    63
    };
hgs
parents:
diff changeset
    64
hgs
parents:
diff changeset
    65
#endif /* CFUNCOMMANDHANDLER_H */