RServiceResolver Class Reference
| class RServiceResolver : public RSubSessionBase |
| Public Member Functions |
|---|
| IMPORT_C void | Cancel() |
| IMPORT_C void | Close() |
| IMPORT_C void | GetByName(const TDesC &, TPortNum &, TRequestStatus &) |
| IMPORT_C TInt | GetByName(const TDesC &, TPortNum &) |
| IMPORT_C void | GetByNumber(const TUint, TDes &, TRequestStatus &) |
| IMPORT_C TInt | GetByNumber(const TUint, TDes &) |
| IMPORT_C TInt | Open(RSocketServ &, TUint, TUint, TUint) |
| IMPORT_C void | RegisterService(const TDesC &, const TUint &, TRequestStatus &) |
| IMPORT_C TInt | RegisterService(const TDesC &, const TUint &) |
| IMPORT_C void | RemoveService(const TDesC &, const TUint &, TRequestStatus &) |
| IMPORT_C TInt | RemoveService(const TDesC &, const TUint &) |
| Inherited Functions |
|---|
| | RSubSessionBase::CloseSubSession(TInt) |
| | RSubSessionBase::CreateAutoCloseSubSession(RSessionBase &,TInt,const TIpcArgs &) |
| | RSubSessionBase::CreateSubSession(const RSessionBase &,TInt) |
| | RSubSessionBase::CreateSubSession(const RSessionBase &,TInt,const TIpcArgs &) |
| | RSubSessionBase::RSubSessionBase() |
| | RSubSessionBase::Send(TInt)const |
| | RSubSessionBase::Send(TInt,const TIpcArgs &)const |
| | RSubSessionBase::SendReceive(TInt)const |
| | RSubSessionBase::SendReceive(TInt,TRequestStatus &)const |
| | RSubSessionBase::SendReceive(TInt,const TIpcArgs &)const |
| | RSubSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const |
| | RSubSessionBase::Session()const |
| | RSubSessionBase::SubSessionHandle()const |
Detailed Description
Provides an interface to resolver service names and ports.
Member Function Documentation
Cancel ( )
Cancels any pending request.
Close ( )
Closes a service resolver service
If a service has been opened using Open(), then it should be closed using Close(). This will ensure all associated resources are released.
GetByName ( const TDesC &, TPortNum &, TRequestStatus & )
Gets a service by name asynchronously.
| Parameter | Description | | aName | Name of the service to get. |
| aPort | On completion, the port associated with the service. |
| aStatus | On completion, KErrNone if successful otherwise another of the system-wide error codes. |
GetByName ( const TDesC &, TPortNum & )
| Parameter | Description | | aName | Name of the service to get. |
| aPort | On return, the port associated with the service. |
Returns: KErrNone if successful otherwise another of the system-wide error codes.
GetByNumber ( const TUint, TDes &, TRequestStatus & )
Gets the name of the service asynchronously.
| Parameter | Description | | aPort | Port of the service. |
| aName | On completion, the name of the service. |
| aStatus | On completion, KErrNone if successful otherwise another of the system-wide error codes. |
GetByNumber ( const TUint, TDes & )
Gets the name of the service
| Parameter | Description | | aPort | Port of the service. |
| aName | On return, the name of the service. |
Returns: KErrNone if successful otherwise another of the system-wide error codes.
Open ( RSocketServ &, TUint, TUint, TUint )
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.
| Parameter | Description | | aSocketServer | The socket server session. |
| anAddrFamily | A constant identifying the protocol family. |
| sockType | A constant that identifies the socket type. |
| aProtocol | A constant that identifies the protocol that provides the service. |
Returns: KErrNone if successful otherwise another of the system-wide error codes.
RegisterService ( const TDesC &, const TUint &, TRequestStatus & )
Registers a new service asynchronously.
-
capability
- NetworkControl To protect against dangerous new services being added, which may steal legimate services resources
| Parameter | Description | | aName | Name of the service. |
| aPort | Port of the service. |
| aStatus | On completion, KErrNone if successful otherwise another of the system-wide error codes. |
RegisterService ( const TDesC &, const TUint & )
Registers a new service.
-
capability
- NetworkControl To protect against dangerous new services being added, which may steal legimate services resources
| Parameter | Description | | aName | Name of the service. |
| aPort | Port of the service. |
Returns: KErrNone if successful, otherwise another of the system-wide error codes.
RemoveService ( const TDesC &, const TUint &, TRequestStatus & )
Removes a service asynchronously.
-
capability
- NetworkControl Ensure that only privileged apps can remove information from the service resolver
| Parameter | Description | | aName | Name of the service to remove. |
| aPort | Port of the service to remove. |
| aStatus | On completion, KErrNone if successful otherwise another of the system-wide error codes. |
RemoveService ( const TDesC &, const TUint & )
Removes a service.
-
capability
- NetworkControl Ensure that only privileged apps can remove information from the service resolver
| Parameter | Description | | aName | Name of the service. |
| aPort | Port of the service. |
Returns: KErrNone if successful otherwise another of the system-wide error codes.