Public Types | Public Member Functions
Tonido::Data::NetworkManager Class Reference

Manages Network related information. More...

List of all members.

Public Types

typedef boost::shared_ptr
< NetworkManager
SharedPtr

Public Member Functions

 NetworkManager (void)
 Ctor.
 ~NetworkManager (void)
 Dtor.
void init ()
 init
bool isOnline ()
 Returns the Tonido Network online status of the system.
void networkEnable (bool a_enable)
 Controls the Tonido Network online/offline status.
bool networkEnable ()
 Returns whether the Tonido network is enabled or not.
Tonido::Defs::HTTPAccessLevel HTTPAccess ()
 Returns status of Tonido Web server.
void HTTPAccess (Tonido::Defs::HTTPAccessLevel a_level)
 Sets status of Tonido Web Server.
void networkSpeedLimit (uint32_bt a_speed)
 Sets the Network Speed Limit.
uint32_bt networkSpeedLimit ()
 Returns current Network Speed Limit.
void UPnPEnable (bool a_enable)
 Controls UPnP status.
bool UPnPEnable ()
 Returns whether UPnP is enabled or not.
bool UPnPActive ()
 Returns whether UPnP is enabled currently.
void UPnPActive (bool a_isUPnPActive)
 Sets whether UPnP is active.
void relayEnable (bool a_enable)
 Controls Relaying status.
bool relayEnable ()
 Returns whether Relay is enabled or not.
bool relayActive ()
 Returns whether Relay is enabled currently.
void relayActive (bool a_isRelayActive)
 Sets whether Relay is active.
bool relayIsHTTPS ()
 Returns whether Relay is via HTTPS.
void relayIsHTTPS (bool a_isRelayHTTPS)
 Sets whether Relay is via HTTPS.
void relayStatus (const std::string &a_relayStatus)
 Sets Relay status.
std::string relayStatus ()
 Gets Relay status.
void relayExpiry (const std::string &a_relayExpiry)
 Sets Relay Expiry.
std::string relayExpiry ()
 Gets Relay Expiry.
void relayAddress (const Poco::Net::SocketAddress &a_address)
 Sets the Relay IP.
Poco::Net::SocketAddress relayAddress ()
 Gets the Relay IP.
void clearCurrentRelayIP ()
 Clear Current Relay Server IP.
bool ipAuthRecordsGet (std::vector< IPData > &a_List, const uint32_bt &a_allowDeny)
 Retrieves IP authorization records.
bool ipAuthRecordAdd (const IPData &a_data)
 Add a new authorization record for an ip address or a range of ip addresses.
bool ipAuthRecordRemove (const IPData &a_data)
 Delete an authorization record for an ip address or a range of ip addresses.
bool isIPBlocked (const Poco::Net::IPAddress &a_address)
 Checks if a given IP address is blocked.
void processNetworkOnline ()
 Processes Network Online Event.
void processNetworkOffline ()
 Processes Network Offline Event.
void processLogin ()
 Processes Profile Login Event.
void updateCachedPrivateIP ()
 Update Cached Private IP.
std::string getCachedPrivateIP ()
 Get Cached Private IP.
void updateCachedPublicIP (const std::string &a_publicIP)
 Update Cached Public IP.
std::string getCachedPublicIP ()
 Get Cached Public IP.
void addAppExRecord (const std::string &a_tag, const std::string &a_host, int a_port)
 Add AppEx Record.
void removeAppExRecord (const std::string &a_tag)
 Remove AppEx Record.
bool getAppExRecord (const std::string &a_tag, std::string &a_host, int &port)
 Get AppEx Record for a specific Tag.

Detailed Description

Manages Network related information.


Constructor & Destructor Documentation

Tonido::Data::NetworkManager::NetworkManager ( void  )

Ctor.

details if needed ...

Tonido::Data::NetworkManager::~NetworkManager ( void  )

Dtor.

details if needed ...


Member Function Documentation

void Tonido::Data::NetworkManager::clearCurrentRelayIP ( )

Clear Current Relay Server IP.

Internal Use Only

void Tonido::Data::NetworkManager::init ( )

init

Parameters:
[in]none
[out]none
Returns:
none
bool Tonido::Data::NetworkManager::ipAuthRecordAdd ( const IPData a_data)

Add a new authorization record for an ip address or a range of ip addresses.

Returns:
true on successful action
bool Tonido::Data::NetworkManager::ipAuthRecordRemove ( const IPData a_data)

Delete an authorization record for an ip address or a range of ip addresses.

Parameters:
[in]Startof IP range
[in]Endof IP range if applicable
Returns:
true on successful action
bool Tonido::Data::NetworkManager::ipAuthRecordsGet ( std::vector< IPData > &  a_List,
const uint32_bt &  a_allowDeny 
)

Retrieves IP authorization records.

Parameters:
[out]Authorizationrecords
[in]1for allowed list and 0 for blocked list
Returns:
true on successful action
bool Tonido::Data::NetworkManager::isIPBlocked ( const Poco::Net::IPAddress &  a_address)

Checks if a given IP address is blocked.

Returns:
true if blocked, false otherwise
bool Tonido::Data::NetworkManager::isOnline ( )

Returns the Tonido Network online status of the system.

Parameters:
[in]none
[out]none
Returns:
true if the system is online and connected, false otherwise
void Tonido::Data::NetworkManager::networkEnable ( bool  a_enable)

Controls the Tonido Network online/offline status.

Parameters:
[in]a_enableflag
Returns:
none
void Tonido::Data::NetworkManager::networkSpeedLimit ( uint32_bt  a_speed)

Sets the Network Speed Limit.

Parameters:
[in]a_enablespeed in bytes/sec
Returns:
none
void Tonido::Data::NetworkManager::relayActive ( bool  a_isRelayActive)

Sets whether Relay is active.

Internal Use Only

void Tonido::Data::NetworkManager::relayAddress ( const Poco::Net::SocketAddress &  a_address)

Sets the Relay IP.

Internal Use Only

Poco::Net::SocketAddress Tonido::Data::NetworkManager::relayAddress ( )

Gets the Relay IP.

Internal Use Only

void Tonido::Data::NetworkManager::relayEnable ( bool  a_enable)

Controls Relaying status.

Parameters:
[in]a_enableflag
Returns:
none
void Tonido::Data::NetworkManager::relayExpiry ( const std::string &  a_relayExpiry)

Sets Relay Expiry.

Internal Use Only

std::string Tonido::Data::NetworkManager::relayExpiry ( )

Gets Relay Expiry.

Internal Use Only

void Tonido::Data::NetworkManager::relayIsHTTPS ( bool  a_isRelayHTTPS)

Sets whether Relay is via HTTPS.

Internal Use Only

void Tonido::Data::NetworkManager::relayStatus ( const std::string &  a_relayStatus)

Sets Relay status.

Internal Use Only

std::string Tonido::Data::NetworkManager::relayStatus ( )

Gets Relay status.

Internal Use Only

void Tonido::Data::NetworkManager::UPnPActive ( bool  a_isUPnPActive)

Sets whether UPnP is active.

Internal Use Only

void Tonido::Data::NetworkManager::UPnPEnable ( bool  a_enable)

Controls UPnP status.

Parameters:
[in]a_enableflag
Returns:
none

Generated on Wed Oct 12 2011 21:46:53. © CodeLathe LLC 2007-2011. All Rights Reserved.