qtinternetradio/irqnetworkcontroller/inc/irqnetworkcontroller_p.h
changeset 14 896e9dbc5f19
equal deleted inserted replaced
12:608f67c22514 14:896e9dbc5f19
       
     1 /*
       
     2 * Copyright (c) 2009 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 #ifndef IRQNETWORKCONTROLLERPRIVATE_H_
       
    18 #define IRQNETWORKCONTROLLERPRIVATE_H_
       
    19 
       
    20 #include <QObject>
       
    21 #include "irnetworkcontroller.h"
       
    22 #include "irqenums.h"
       
    23 #include "irqevent.h"
       
    24 
       
    25 class IRQNetworkController;
       
    26 /**
       
    27  * This class implements the IR Network Controller component
       
    28  */
       
    29 
       
    30 class IRQNetworkControllerPrivate : public MIRActiveNetworkObserver
       
    31                                   , public MIRNetworkController
       
    32 {    
       
    33 public:
       
    34     IRQNetworkControllerPrivate(IRQNetworkController* aNetworkController);
       
    35     
       
    36     /**
       
    37      *  Create resources
       
    38      *  @return bool
       
    39      */
       
    40     bool init();
       
    41     /**
       
    42      *  Default C++ Destructor
       
    43      */
       
    44     ~IRQNetworkControllerPrivate();
       
    45 
       
    46     /**
       
    47      *  Return the variable which indicates if connection is active or not
       
    48      *  @return bool
       
    49      */
       
    50     bool getNetworkStatus() const;
       
    51 
       
    52     /**
       
    53      *  Return the IAP Id of the chosen IAP
       
    54      *  @return int Error code
       
    55      */
       
    56     IRQError getIAPId(unsigned long& aIapId) const;
       
    57     
       
    58     /**
       
    59      *  Configure the Access Point which is used by all the components for network connectivity
       
    60      */
       
    61     void  chooseAccessPoint();
       
    62 
       
    63     /*
       
    64      * Cancel configuring access point
       
    65      */
       
    66     void cancelConnecting();
       
    67     
       
    68     /**
       
    69      *  This api is used to determine if the phone is in offline mode
       
    70      *  @return True if the phone is in offline mode else False
       
    71      */
       
    72     bool isOfflineMode();
       
    73 
       
    74     /**
       
    75      *  This api is used to determine if the phone supports WLan usage
       
    76      *  @return True if the phone supports else False
       
    77      */
       
    78     bool isWlanSupported() const;
       
    79 
       
    80     /**
       
    81      *  Reset the connection status to Disconnected state
       
    82      */
       
    83     void resetConnectionStatus();
       
    84 
       
    85     /**
       
    86      *  Used to determine the type of connection
       
    87      *  @return enum describing the type of connection ( GPRS/3G/WiFi )
       
    88      */
       
    89     IRQConnectionType identifyConnectionType() const;
       
    90 
       
    91     /**
       
    92      *  Notifies all observers whose network request is active to reissue the request
       
    93      */
       
    94     void notifyActiveNetworkObservers(IRQNetworkEvent aEvent);
       
    95 
       
    96     /**
       
    97      *  Indicates if the hand over of network connection has happened
       
    98      */
       
    99     bool isHandlingOverConnection();
       
   100 
       
   101     /**
       
   102      *  Indicates if chooseAccessPoint is called
       
   103      */
       
   104     bool isConnectRequestIssued() const;
       
   105 
       
   106     /**
       
   107      *  MIRActiveNetworkObserver::NotifyActiveNetworkObserversL()
       
   108      *  Callback which notifies all observers whose network request is active to reissue the request
       
   109      *  @param aEvent Indicates the type of network event that occurred
       
   110      */
       
   111     void NotifyActiveNetworkObserversL(TIRNetworkEvent aEvent);
       
   112 
       
   113     /**
       
   114      *  MIRActiveNetworkObserver::ResetPendingRequests()
       
   115      *  Callback which notifies all observers whose network request is active to reset the pending
       
   116      *  request status
       
   117      */
       
   118     void ResetPendingRequests(TBool aValue);
       
   119 
       
   120     /**
       
   121      *  MIRNetworkController::IRNetworkEventL()
       
   122      *  @param aEvent Indicates the type of network event that occurred
       
   123      */
       
   124     void IRNetworkEventL(TIRNetworkEvent aEvent);
       
   125 
       
   126 private:
       
   127 
       
   128     /**
       
   129      *  NetworkController singleton instance
       
   130      */
       
   131     CIRNetworkController* iNetworkController;
       
   132     
       
   133     IRQNetworkController* const q_ptr;
       
   134 };
       
   135 
       
   136 #endif /* IRQNetworkControllerPrivate_H_ */