PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBAddrInfoCache
Wrapper Class for the IAddrInfoCache interface.
#include <SFBAddrInfoCache.h.hpp>
class SFBAddrInfoCache : public SFBQuery;
SFMTYPEDEFWRAPPER(SFBAddrInfoCache)

Inheritance diagram

 Inheritance diagram of SFBAddrInfoCacheClass

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
X X O O

Reference

BREW API IAddrInfoCache

Member

Public Functions
SFCError ClearCache( Void )
Clear the cache.
SFCError ClearCacheEntry( ACharConstPtr node )
Clear single cache entry.
SFCError ClearCacheEntry( SFXAnsiStringConstRef node )
Clear single cache entry.
static
SFBAddrInfoCacheSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBAddrInfoCache instance.
static
SFBAddrInfoCacheSmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBAddrInfoCache instance.
SFCError SelectNetwork( SInt32 network )
This function selects a specific data network.
SFCError QueryInterface( AEECLSID clsid , VoidHandle handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFCError QueryInterface( AEECLSID clsid , SFBBaseSmpPtr handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFBBaseSmp QueryInterface( AEECLSID clsid ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
Void Self( AEECLSID clsidReq , SFBQuerySmpPtr clone , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
SFBQuerySmp Self( AEECLSID clsidReq , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
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.

SFBAddrInfoCache::ClearCache
Clear the cache.
[ public ]
SFCError ClearCache(Void);

Return value

AEE_SUCCESS: The cache was cleared. All other values indicate failure; the caller should verify that ClearCache() succeeded.

Reference

BREW API IADDRINFOCACHE_ClearCache | SFBAddrInfoCache::ClearCacheEntry


SFBAddrInfoCache::ClearCacheEntry
Clear single cache entry.
[ public ]
SFCError ClearCacheEntry(
    ACharConstPtr node   // host name
);
[ public ]
SFCError ClearCacheEntry(
    SFXAnsiStringConstRef node   // host name
);

Return value

AEE_NET_SUCCESS: The cache entry was cleared or does not exist. All other values indicate failure; the caller should verify that ClearCacheEntry() succeeded.

Reference

BREW API IADDRINFOCACHE_ClearCache | SFBAddrInfoCache::ClearCache


SFBAddrInfoCache::NewInstance
Create a new SFBAddrInfoCache instance.
[ public, static ]
SFBAddrInfoCacheSmp NewInstance(
    SFCErrorPtr exception = null   // Error
);
[ public, static ]
SFBAddrInfoCacheSmp NewInstance(
    AEECLSID id                    // Class ID
    SFCErrorPtr exception = null   // Error
);

SFBAddrInfoCache::SelectNetwork
This function selects a specific data network.
[ public ]
SFCError SelectNetwork(
    SInt32 network   // data network type
);

Return value

  • AEE_NET_SUCCESS: the data network was selected
  • AEE_EBADSTATE: the network is not valid
  • AEE_NET_EOPNOTSUPP: the network has already been selected.
  • AEE_EFAILED: other error.
Other error codes are also possible.

Description

When an SFBAddrInfoCache instance is created, no network is selected. If an IAddrInfoCache method that requires a network (ClearCache) is called before SFBAddrInfoCache::SelectNetwork(), AEE_NETWORK_DEFAULT will be implicitly selected, and the decision of which network to actually use is deferred to lower layers.

Once a network has been selected, either explicitly via SFBAddrInfoCache::SelectNetwork(), or implicitly as described above, the network may not be changed. To use a different network, a new SFBAddrInfoCache instance is required.

Reference

BREW API IADDRINFOCACHE_SelectNetwork