mmsengine/mmsconninit/inc/MmsPhoneClient.H
author Simon Howkins <simonh@symbian.org>
Mon, 22 Nov 2010 17:05:03 +0000
branchRCL_3
changeset 83 26c290f28dd1
parent 0 72b543305e3a
permissions -rw-r--r--
Removed duplicate instructions for creating some messaging MIFs

/*
* Copyright (c) 2005 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:  
*     This class connects telephony server and requests information from it.
*
*/



#ifndef CMMSPHONECLIENT_H
#define CMMSPHONECLIENT_H

// INCLUDES
#include <etelmm.h> // RMobilePhone

// CONSTANTS
// MACROS
// DATA TYPES
// FUNCTION PROTOTYPES
// FORWARD DECLARATIONS
// CLASS DECLARATION
class RTelServer;
class RMobilePhone;

/**
* Class for asking information from telephony server.
* @lib mmsconninit.dll
* @since 3.0
*/
class CMmsPhoneClient : public CActive
    {        
    public:  // Constructors and destructor

        /**
        * Two-phased constructor.
        */
        IMPORT_C static CMmsPhoneClient* NewL();

        /**
        * Destructor.
        */
        virtual ~CMmsPhoneClient();

    public: // New functions

        /**
        * Roaming determines whether phone is roaming currently or not
        * @param aStatus the iStatus of the caller. On completion, the caller
        * should interpret aStatus as follows:
        *   <  0 indicates an error
        *   == 0 indicates that phone is not roaming
        *   >  0 indicates that phone is roaming
        */
        IMPORT_C void Roaming( TRequestStatus& aStatus );
        
        /**
        * NetworkMode determines in what kind of network the phone currently is.
        * @return TMmsNetworkMode
        */
        IMPORT_C RMobilePhone::TMobilePhoneNetworkMode NetworkMode();
        
    public: // Functions from base classes

    protected:  // New functions

    protected:  // Functions from base classes

        /**
        * Active object cancellation
        */
        void DoCancel();

    private:

        /**
        * C++ default constructor.
        */
        CMmsPhoneClient();

        /**
        * By default Symbian OS constructor is private.
        */
        void ConstructL();

        /**
        * Completion
        */
        void RunL();

    private:    // Data

        TRequestStatus*     iClientStatus;
        
        RTelServer          iTelServer;
        RMobilePhone        iMobilePhone;
        RMobilePhone::TMobilePhoneRegistrationStatus iRegistrationStatus;
        TInt                iRequestId;
    };

#endif      // CMMSPHONECLIENT_H

// End of File