class RServiceResolver : public RSubSessionBase;
Description
Provides an interface to resolver service names and ports.
Derivation
RServiceResolver
- Provides an interface to resolver service names and ports.
Members
Defined in RServiceResolver
:
Cancel()
Cancels any pending request.
Close()
Closes a service resolver service
GetByName(const TDesC &,TPortNum &)
Get a service by name.
GetByName(const TDesC &,TPortNum &,TRequestStatus &)
Gets a service by name asynchronously.
GetByNumber(const TUint,TDes &)
Gets the name of the service
GetByNumber(const TUint,TDes &,TRequestStatus &)
Gets the name of the service asynchronously.
Open(RSocketServ &,TUint,TUint,TUint)
set up the sub session - unlike name resolvers and net databases, services can b...
RegisterService(const TDesC &,const TUint &)
Registers a new service.
RegisterService(const TDesC &,const TUint &,TRequestStatus &)
Registers a new service asynchronously.
RemoveService(const TDesC &,const TUint &)
Removes a service.
RemoveService(const TDesC &,const TUint &,TRequestStatus &)
Removes a service asynchronously.
Inherited from RSubSessionBase
:
CloseSubSession(TInt)
Closes the sub-session.
CreateAutoCloseSubSession(RSessionBase &,TInt,const TIpcArgs &)
Creates a new sub-session within an existing session. The new sub-session takes ...
CreateSubSession(const RSessionBase &,TInt)
Creates a new sub-session within an existing session.
CreateSubSession(const RSessionBase &,TInt,const TIpcArgs &)
Creates a new sub-session within an existing session.
Send(TInt)const
Sends a blind message to the server - no reply is expected.
Send(TInt,const TIpcArgs &)const
Sends a blind message to the server - no reply is expected.
SendReceive(TInt)const
Sends a message to the server and waits synchronously for a reply.
SendReceive(TInt,TRequestStatus &)const
Sends a message to the server and waits asynchronously for the reply.
SendReceive(TInt,const TIpcArgs &)const
Sends a message to the server and waits synchronously for a reply.
SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
Sends a message to the server and waits asynchronously for the reply.
Session()const
Returns a copy of the session associated with this sub-session.
SubSessionHandle()const
Gets the sub-session handle number.
IMPORT_C TInt Open(RSocketServ &aSocketServer, TUint anAddrFamily, TUint sockType, TUint aProtocol);
Description
set up the sub session - unlike name resolvers and net databases, services can be socket type specific. Opens a service resolver
service.
Unlike name resolvers (RHostResolver
) and net databases (RNetDatabase
), services can be socket type specific.
Parameters
RSocketServ &aSocketServer |
The socket server session.
|
TUint anAddrFamily |
A constant identifying the protocol family.
|
TUint sockType |
A constant that identifies the socket type.
|
TUint aProtocol |
A constant that identifies the protocol that provides the service.
|
|
Return value
TInt
|
KErrNone if successful otherwise another of the system-wide error codes.
|
|
IMPORT_C void GetByName(const TDesC &aName, TPortNum &aPort, TRequestStatus &aStatus);
Description
Gets a service by name asynchronously.
Parameters
const TDesC16 &aName |
Name of the service to get.
|
TPckgBuf &aPort |
On completion, the port associated with the service.
|
TRequestStatus &aStatus |
On completion, KErrNone if successful otherwise another of the system-wide error codes.
|
|
IMPORT_C TInt GetByName(const TDesC &aName, TPortNum &aPort);
Description
Get a service by name.
Parameters
const TDesC16 &aName |
Name of the service to get.
|
TPckgBuf &aPort |
On return, the port associated with the service.
|
|
Return value
TInt
|
KErrNone if successful otherwise another of the system-wide error codes.
|
|
IMPORT_C void GetByNumber(const TUint aPort, TDes &aName, TRequestStatus &aStatus);
Description
Gets the name of the service asynchronously.
Parameters
const TUint aPort |
Port of the service.
|
TDes16 &aName |
On completion, the name of the service.
|
TRequestStatus &aStatus |
On completion, KErrNone if successful otherwise another of the system-wide error codes.
|
|
IMPORT_C TInt GetByNumber(const TUint aPort, TDes &aName);
Description
Gets the name of the service
Parameters
const TUint aPort |
Port of the service.
|
TDes16 &aName |
On return, the name of the service.
|
|
Return value
TInt
|
KErrNone if successful otherwise another of the system-wide error codes.
|
|
Capability: |
NetworkControl |
To protect against dangerous new services being added, which may steal legimate services resources |
IMPORT_C void RegisterService(const TDesC &aName, const TUint &aPort, TRequestStatus &aStatus);
Description
Registers a new service asynchronously.
Parameters
const TDesC16 &aName |
Name of the service.
|
const TUint &aPort |
Port of the service.
|
TRequestStatus &aStatus |
On completion, KErrNone if successful otherwise another of the system-wide error codes.
|
|
Capability: |
NetworkControl |
To protect against dangerous new services being added, which may steal legimate services resources |
IMPORT_C TInt RegisterService(const TDesC &aName, const TUint &aPort);
Description
Registers a new service.
Parameters
const TDesC16 &aName |
Name of the service.
|
const TUint &aPort |
Port of the service.
|
|
Return value
TInt
|
KErrNone if successful, otherwise another of the system-wide error codes.
|
|
Capability: |
NetworkControl |
Ensure that only privileged apps can remove information from the service resolver |
IMPORT_C void RemoveService(const TDesC &aName, const TUint &aPort, TRequestStatus &aStatus);
Description
Removes a service asynchronously.
Parameters
const TDesC16 &aName |
Name of the service to remove.
|
const TUint &aPort |
Port of the service to remove.
|
TRequestStatus &aStatus |
On completion, KErrNone if successful otherwise another of the system-wide error codes.
|
|
Capability: |
NetworkControl |
Ensure that only privileged apps can remove information from the service resolver |
IMPORT_C TInt RemoveService(const TDesC &aName, const TUint &aPort);
Description
Removes a service.
Parameters
const TDesC16 &aName |
Name of the service.
|
const TUint &aPort |
Port of the service.
|
|
Return value
TInt
|
KErrNone if successful otherwise another of the system-wide error codes.
|
|
IMPORT_C void Close();
Description
Closes a service resolver service
If a service has been opened using RServiceResolver::Open(RSocketServ &,TUint,TUint,TUint)
, then it should be closed using RServiceResolver::Close()
. This will ensure all associated resources are released.
IMPORT_C void Cancel();
Description
Cancels any pending request.