RNetDatabase Class Reference

#include <es_sock.h>

Link against: esock.lib

class RNetDatabase : public RSubSessionBase

Inherits from

Detailed Description

Provides an interface to network databases, such as LM-IAS with IrDA, that may be provided by particular protocol modules.

Before making any queries, a connection to a socket server session must be made.

Each function is available in both synchronous and asynchronous versions.

A single RNetDatabase can only perform one request of any type at once. A client is panicked if it makes two requests.

Particular database access services will specify the format of queries and of responses.

Member Function Documentation

Add ( const TDesC8 &, TRequestStatus & )

IMPORT_C voidAdd(const TDesC8 &anItem,
TRequestStatus &aStat
)

Adds a record to the database asynchronously.

Parameters
anItemThe record to add
aStatIndicates asynchronous operation and on completion contains an error code: see the system-wide error codes.
Capability
Dependenton the type of connection so deferred to PRT

Add ( const TDesC8 & )

IMPORT_C TIntAdd(const TDesC8 &anItem)

Adds a record to the database.

Parameters
anItemThe record to add
Return Value
KErrNone if successful otherwise another of the system-wide error codes.
Capability
Dependenton the type of connection so deferred to PRT

Cancel ( )

IMPORT_C voidCancel()

Cancels any outstanding asynchronous calls, which will return with error code KErrCancel.

Close ( )

IMPORT_C voidClose()

Closes a database access service. If a service has been opened using Open(), then it should be closed using Close(). This will ensure all associated resources are released.

Open ( RSocketServ &, TUint, TUint )

IMPORT_C TIntOpen(RSocketServ &aSocketServer,
TUintanAddrFamily,
TUintaProtocol
)

Initialises a database access service provided by a particular protocol. It must be called before other object functions are used.

Parameters
aSocketServerThe socket server session
anAddrFamilyA constant identifying the protocol family
aProtocolA constant that identifies the protocol that provides the database access service
Return Value
KErrNone if successful otherwise another of the system-wide error codes.

Query ( const TDesC8 &, TDes8 &, TRequestStatus & )

IMPORT_C voidQuery(const TDesC8 &aQuery,
TDes8 &aResult,
TRequestStatus &aStat
)

Makes a query to the database asynchronously.

Parameters
aQueryThe query to perform
aResultThe result of the query
aStatIndicates asynchronous operation and on completion contains an error code: see the system-wide error codes.
Capability
Dependenton the type of connection so deferred to PRT

Query ( const TDesC8 &, TDes8 & )

IMPORT_C TIntQuery(const TDesC8 &aQuery,
TDes8 &aResult
)

Makes a query to the database.

Parameters
aQueryThe query to perform
aResultThe result of the query
Return Value
KErrNone if successful otherwise another of the system-wide error codes.
Capability
Dependenton the type of connection so deferred to PRT

Remove ( const TDesC8 &, TRequestStatus & )

IMPORT_C voidRemove(const TDesC8 &anItem,
TRequestStatus &aStat
)

Removes a record from the database asynchronously.

Parameters
anItemThe record to remove
aStatIndicates asynchronous operation and on completion contains an error code: see the system-wide error codes.
Capability
Dependenton the type of connection so deferred to PRT

Remove ( const TDesC8 & )

IMPORT_C TIntRemove(const TDesC8 &anItem)

Removes a record from the database.

Parameters
anItemThe record to remove
Return Value
KErrNone if successful otherwise another of the system-wide error codes.
Capability
Dependenton the type of connection so deferred to PRT