dosservices/dosserver/inc/saeetelobserver.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2 * Copyright (c) 2003 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 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef SAEETELOBSERVER_H
       
    20 #define SAEETELOBSERVER_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <etelpckt.h>
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CSaePubSubNotifier;
       
    30 class CSaeGprsAvailabilityObs;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  This class is responsible for creating the ETel observer
       
    36 */
       
    37 NONSHARABLE_CLASS( CSaeEtelObserver ) : public CBase
       
    38     {
       
    39     public:  // Constructors and destructor
       
    40         
       
    41         /**
       
    42         * C++ default constructor.
       
    43         */
       
    44         CSaeEtelObserver( CSaePubSubNotifier* aPubSubNotifier );
       
    45 
       
    46         /**
       
    47         * Two-phased constructor.
       
    48         */
       
    49         static CSaeEtelObserver* NewL( CSaePubSubNotifier* aPubSubNotifier );
       
    50 
       
    51         /**
       
    52         * Destructor.
       
    53         */
       
    54         virtual ~CSaeEtelObserver();
       
    55 
       
    56     public: // New functions
       
    57 
       
    58 		/**
       
    59         * Initialize the Etel observer.
       
    60 		* Create GPRS session and observers, and start listening for events.
       
    61         * @return completion code (standard Symbian error code, KErrNone if ok)
       
    62         */
       
    63 		TInt StartListeningL();
       
    64 
       
    65 		/**
       
    66         * Notifies Publish and Subscribe (delegates it to iPubSubNotifier)
       
    67         * @param aVariable SA variable uid
       
    68         * @param aState New state
       
    69         */
       
    70 		void NotifyPubSub( const TUid aVariable, const TInt aState );
       
    71 
       
    72     private:
       
    73 
       
    74         /**
       
    75         * By default EPOC constructor is private.
       
    76         */
       
    77         void ConstructL();
       
    78 
       
    79         // By default, prohibit copy constructor
       
    80         CSaeEtelObserver( const CSaeEtelObserver& );
       
    81         // Prohibit assigment operator
       
    82         CSaeEtelObserver& operator= ( const CSaeEtelObserver& );
       
    83 
       
    84     private:    // Data
       
    85     
       
    86 		// A pointer to the Publish and Subscribe interface. Not owned.
       
    87 		CSaePubSubNotifier* iPubSubNotifier;
       
    88 		// Observes the GPRS availability
       
    89 		CSaeGprsAvailabilityObs* iGprsAvailabilityObs;
       
    90 		// RTelServer session
       
    91 		RTelServer iEtelServer;
       
    92 		// RPhone session
       
    93 		RPhone iPhone;
       
    94 		// MultiMode Etel API
       
    95 		RPacketService iService;
       
    96   };
       
    97 
       
    98 #endif      // SAEETELOBSERVER   
       
    99             
       
   100 // End of File