SophiaFramework UNIVERSE 5.3 |
BREW 2.0 | BREW 2.1 | BREW 3.1 | BREW 4.0 |
---|---|---|---|
O | O | O | O |
Public Functions | |
---|---|
SFCError |
GetDefaultNetwork(
SInt32Ptr network
) Return the default data network.
|
SInt32 |
GetDefaultNetwork( Void ) Return the default data network.
|
Void |
GetHostByName(
AEEDNSResult* result
, ACharConstPtr domain
, SFXCallbackPtr callback
) Retrieve IP addresses associated with the specified host name.
|
Void |
GetHostByName(
AEEDNSResult* result
, SFXAnsiStringConstRef domain
, SFXCallbackPtr callback
) Retrieve IP addresses associated with the specified host name.
|
SFCError |
GetLastError( Void ) Return the last error that occurred by INetMgr interface.
|
INAddr |
GetMyIPAddr( Void ) Return the IP address of the local host or device.
|
SFCError |
GetOpt(
SInt32 optName
, VoidPtr value
, SInt32Ptr size
) Provide the ability to query certain network options.
|
SFCError |
GetOpt(
SInt32 optName
, SFXBufferPtr value
) Provide the ability to query certain network options.
|
SFCError |
GetUMTSCount(
UInt16Ptr count
) Return the number of Packet Data Profiles (UMTS only).
|
NetState |
NetStatus(
AEENetStats* stats
) Return the current network status.
|
static SFBNetMgrSmp |
NewInstance(
SFCErrorPtr exception = null
) Create a new SFBNetMgr instance.
|
static SFBNetMgrSmp |
NewInstance(
AEECLSID id
, SFCErrorPtr exception = null
) Create a new SFBNetMgr instance.
|
SInt32 |
OnEvent(
PFNNETMGREVENT notify
, VoidPtr data = null
, Bool reg = true
) This function allows the caller to register to receive notification of in progress SFBNetMgr operations.
|
SFBSocketSmp |
OpenSocket(
NetSocket type
) Create a socket and returns a pointer to the ISocket Interface.
|
SInt32 |
RegisterEvent(
PFNNETMGREVENT notify
, VoidPtr data = null
)
Register the callback function.
|
SFCError |
SelectNetwork(
SInt32 network
) Selects a specific data network.
|
UInt16 |
SetLinger(
UInt16 secs
) Set the linger time for the network connection to the value specified by Secs,
and returns the previous value.
|
SFCError |
SetOpt(
SInt32 optName
, VoidPtr value
, SInt32 size
) Provide the ability to configure certain network options.
|
SFCError |
SetOpt(
SInt32 optName
, SFXBufferPtr value
) Provide the ability to configure certain network options.
|
SInt32 |
UnregisterEvent(
PFNNETMGREVENT notify
, VoidPtr data = null
)
Unregister the callback function.
|
Protected Functions | |
---|---|
static SFBBaseSmp |
FactoryByCreate(
AEECLSID id
, SFCErrorPtr exception = null
)
(inherits from SFBBase)
Create the instance for the specified ClassID's interface.
|
static SFBBaseSmp |
FactoryByQuery(
SFBQuerySmpConstRef query
, AEECLSID id
, SFCErrorPtr exception = null
)
(inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.
|
[ public ] SFCError GetDefaultNetwork( SInt32Ptr network // pointer to network // will be filled in with AEE_NETWORK_* );
[ public ] SInt32 GetDefaultNetwork(Void);
This function is available in BREW 3.1.
[ public ] Void GetHostByName( AEEDNSResult* result // pointer to the result structure ACharConstPtr domain // domain name to be resolved, terminated by a colon (:),slash (/), or null (\0) character SFXCallbackPtr callback // pointer to the callback );
[ public ] Void GetHostByName( AEEDNSResult* result // pointer to the result structure SFXAnsiStringConstRef domain // domain name to be resolved, terminated by a colon (:),slash (/), or null (\0) character SFXCallbackPtr callback // pointer to the callback );
[ public ] SFCError GetLastError(Void);
[ public ] INAddr GetMyIPAddr(Void);
[ public ] SFCError GetOpt( SInt32 optName // integer identifying which option to get VoidPtr value // filled with option-specific data SInt32Ptr size // if pOptVal is non-null, on input specifies size of pOptVal, // which must match the required size of the option data. // if pOptVal is null, on input is ignored, on output holds the required size of the option data );
[ public ] SFCError GetOpt( SInt32 optName // integer identifying which option to get SFXBufferPtr value // buffer filled with option-specific data, size can be automatically modified );
This function is available in BREW 3.1.
[ public ] NetState NetStatus( AEENetStats* stats // pointer to the block to be filled with statistical data );
Get the current network status, show it in log.
NetState state; AEENetStats stats; // create SFBNetMgr interface. SFBNetMgrSmp netmgr = SFBNetMgr::NewInstance(); // get the current network status. state = netmgr->NetStatus(&stats); // show the status in log. switch (state) { case NET_INVALID_STATE: DBGPRINTF ("*** Status: Invalid ***"); break; case NET_PPP_OPENING: DBGPRINTF ("*** Status: Opening ***"); break; case NET_PPP_OPEN: DBGPRINTF ("*** Status: Open ***"); break; case NET_PPP_CLOSING: DBGPRINTF ("*** Status: Closing ***"); break; case NET_PPP_CLOSED: DBGPRINTF ("*** Status: Closed ***"); break; case NET_PPP_SLEEPING: DBGPRINTF ("*** Status: Sleeping ***"); break; case NET_PPP_ASLEEP: DBGPRINTF ("*** Status: ASleep ***"); break; case NET_PPP_WAKING: DBGPRINTF ("*** Status: Waking ***"); break; }
[ public, static ] SFBNetMgrSmp NewInstance( SFCErrorPtr exception = null // Error );
[ public, static ] SFBNetMgrSmp NewInstance( AEECLSID id // Class ID SFCErrorPtr exception = null // Error );
[ public ] SInt32 OnEvent( PFNNETMGREVENT notify // user-specified callback to call when event occurs VoidPtr data = null // user-specified context data passed as first argument to callback Bool reg = true // true, if registering, false if deregistering );
[ public ] SFBSocketSmp OpenSocket( NetSocket type // specifies the socket type: AEE_SOCK_STREAM for TCP // AEE_SOCK_DGRAM for UDP Corresponding to stream or datagram sockets respectively );
[ public ] SInt32 RegisterEvent( PFNNETMGREVENT notify // user-specified callback to call when event occurs VoidPtr data = null // user-specified context data passed as first argument to callback );
Calling this function is as same as calling SFBNetMgr::OnEvent( pfn , pUser , true )
This function is available in BREW 3.1.
Set the linger time for the network.
// create the SFBNetMgr interface. SFBNetMgrSmp netmgr = SFBNetMgr::NewInstance(); // set 5 seconds linger time for the network. netmgr->SetLinger(5);
[ public ] SFCError SetOpt( SInt32 optName // integer identifying which option to set VoidPtr value // filled with option-specific data SInt32 size // size of value );
[ public ] SFCError SetOpt( SInt32 optName // integer identifying which option to set SFXBufferPtr value // filled with option-specific data // if null, do nothing and return SFERR_INVALID_PARAM );
[ public ] SInt32 UnregisterEvent( PFNNETMGREVENT notify // callback function to unregister VoidPtr data = null // user-specified context data passed as first argument to callback );
Calling this function is as same as calling SFBNetMgr::OnEvent( pfn , pUser , false )
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |