browsercore/core/network/WebNetworkSession.cpp
changeset 6 1c3b8676e58c
parent 5 0f2326c2a325
child 10 232fbd5a2dcb
equal deleted inserted replaced
5:0f2326c2a325 6:1c3b8676e58c
    19 *
    19 *
    20 */
    20 */
    21 
    21 
    22 #include "WebNetworkSession.h"
    22 #include "WebNetworkSession.h"
    23 
    23 
       
    24 namespace WRT {
       
    25 	
    24 /*!
    26 /*!
    25     Constructs a Web Network Session based on \a QNetworkConfiguration with the given \a parent.
    27     Constructs a Web Network Session based on \a QNetworkConfiguration with the given \a parent.
    26 
    28 
    27     \sa QNetworkConfiguration
    29     \sa QNetworkConfiguration
    28 */
    30 */
   108     {
   110     {
   109         m_NetworkSession->reject();
   111         m_NetworkSession->reject();
   110         // flash the old connection network
   112         // flash the old connection network
   111         qDebug() << "Reject new Network Connection";
   113         qDebug() << "Reject new Network Connection";
   112     }
   114     }
   113     emit sessionConfigurationChanged(m_NetworkSession->configuration()); 
   115 
   114 }
   116     emit sessionConfigurationChanged(activeConfiguration()); 
   115 
   117 }
   116 /*! 
   118 
   117     Handle the stateChanged signal from Network Session.
   119 /*! 
       
   120     Handle the stateChanged signal from Network Session. If the session is based on a single
       
   121     access point configuration, the state of the session is the same state of the associated
       
   122     network interface. A QNetworkConfiguration::ServiceNetwork based session summarizes the 
       
   123     state of all its children and therefore returns the Connected state if at least one of its 
       
   124     sub configurations is connected.
   118     
   125     
   119     It emits networkSignalStrengthChanged signal with current QNetworkConfiguraiton 
   126     It emits networkSignalStrengthChanged signal with current QNetworkConfiguraiton 
   120     and QNetworkSession::State.
   127     and QNetworkSession::State.
   121 */
   128 */
   122 void WebNetworkSession::handleStateChanged(QNetworkSession::State state)
   129 void WebNetworkSession::handleStateChanged(QNetworkSession::State state)
   155     It emits networkNameChanged signal with activeConfiguration.
   162     It emits networkNameChanged signal with activeConfiguration.
   156 */
   163 */
   157 void WebNetworkSession::handleOpened()
   164 void WebNetworkSession::handleOpened()
   158 {   
   165 {   
   159     qDebug() << "Session Opened";
   166     qDebug() << "Session Opened";
   160    
   167 
   161     emit sessionConfigurationChanged(activeConfiguration());
   168     emit sessionConfigurationChanged(activeConfiguration());
   162 }
   169 }
   163 
   170 
   164 /*! 
   171 /*! 
   165     Handle the closed signal from Network Session.
   172     Handle the closed signal from Network Session.
   232         	  break;
   239         	  break;
   233     }
   240     }
   234     
   241     
   235     return activeConfig;
   242     return activeConfig;
   236 }
   243 }
       
   244 
       
   245 } // namespace WRT