class CProtocolFamilyBase : public CBase |
Defines the interface for protocol families.
Protocol families must:
be able to identify the protocols which they can create
be able to create instances of protocol objects for all the protocols they advertise
Public Member Functions | |
---|---|
CProtocolFamilyBase() | |
~CProtocolFamilyBase() | |
IMPORT_C void | Close() |
TInt | Install() |
CProtocolBase * | NewProtocolL(TUint, TUint) |
IMPORT_C void | Open() |
TUint | ProtocolList(TServerProtocolDesc *&) |
IMPORT_C TBool | QueryVersionSupported(const TVersion &) |
TInt | RefCount() |
IMPORT_C TInt | Remove() |
void | SetLibraryL(RLibrary &) |
Protected Attributes | |
---|---|
TVersion | iVersion |
Private Attributes | |
---|---|
CLibUnloader * | iLibUnloader |
CProtocolFamilyRef * | iManagerRef |
TInt | iRefCount |
TInt | Install | ( | ) | [pure virtual] |
Initialises a protocol family.
After the CProtocolFamilyBase-derived object has been created, the first function called by the socket server on that object is Install(). It is at this point that the CProtocolFamilyBase-derived object should perform any initialisation which it needs.
System-wide error code
CProtocolBase * | NewProtocolL | ( | TUint | aSockType, |
TUint | aProtocol | |||
) | [pure virtual] |
Creates a new protocol object.
During socket creation, after the socket server has called Open() on a protocol family, it next calls this function to create an instance of a CProtocolBase-derived object - the protocol itself.
A protocol, or NULL if some error has prevented the protocol from being created.
TUint | ProtocolList | ( | TServerProtocolDesc *& | aProtocolList | ) | [pure virtual] |
Gets a list of supported protocols.
Called during initialisation, directly after Install(). ProtocolList() returns a list of all the protocols in the protocol family. The protocol family object should allocate memory to hold an array of TServerProtocolDesc structures. This function should then fill them in and return the pointer and a count of the number of protocols supported. The socket server caches this information, so that it does not need to keep the protocol module loaded.
The protocol family should not attempt to use static data (which it can't) or to free this memory later, as the socket server will automatically free this storage.
The number of protocols in this protocol family (and entries in the list of protocols)
TServerProtocolDesc *& aProtocolList | This pointer is set to point to memory allocated by the protocol family and filled in as described above |
IMPORT_C TBool | QueryVersionSupported | ( | const TVersion & | aVer | ) | const [virtual] |
const TVersion & aVer |