class RNetDatabase : public RSubSessionBase;
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.
Derivation
RNetDatabase
- Provides an interface to network databases, such as LM-IAS with IrDA, that may b...
Members
Defined in RNetDatabase
:
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 aProtocol);
Description
Initialises a database access service provided by a particular protocol. It must be called before other object functions are
used.
Parameters
RSocketServ &aSocketServer |
The socket server session
|
TUint anAddrFamily |
A constant identifying the protocol family
|
TUint aProtocol |
A constant that identifies the protocol that provides the database access service
|
|
Return value
TInt
|
KErrNone if successful otherwise another of the system-wide error codes.
|
|
Capability: |
Dependent |
on the type of connection so deferred to PRT |
IMPORT_C void Query(const TDesC8 &aQuery, TDes8 &aResult, TRequestStatus &aStat);
Description
Makes a query to the database asynchronously.
Parameters
const TDesC8 &aQuery |
The query to perform
|
TDes8 &aResult |
The result of the query
|
TRequestStatus &aStat |
Indicates asynchronous operation and on completion contains an error code: see the system-wide error codes.
|
|
Capability: |
Dependent |
on the type of connection so deferred to PRT |
IMPORT_C TInt Query(const TDesC8 &aQuery, TDes8 &aResult);
Description
Makes a query to the database.
Parameters
const TDesC8 &aQuery |
The query to perform
|
TDes8 &aResult |
The result of the query
|
|
Return value
TInt
|
KErrNone if successful otherwise another of the system-wide error codes.
|
|
Capability: |
Dependent |
on the type of connection so deferred to PRT |
IMPORT_C void Add(const TDesC8 &anItem, TRequestStatus &aStat);
Description
Adds a record to the database asynchronously.
Parameters
const TDesC8 &anItem |
The record to add
|
TRequestStatus &aStat |
Indicates asynchronous operation and on completion contains an error code: see the system-wide error codes.
|
|
Capability: |
Dependent |
on the type of connection so deferred to PRT |
IMPORT_C TInt Add(const TDesC8 &anItem);
Description
Adds a record to the database.
Parameters
const TDesC8 &anItem |
The record to add
|
|
Return value
TInt
|
KErrNone if successful otherwise another of the system-wide error codes.
|
|
Capability: |
Dependent |
on the type of connection so deferred to PRT |
IMPORT_C void Remove(const TDesC8 &anItem, TRequestStatus &aStat);
Description
Removes a record from the database asynchronously.
Parameters
const TDesC8 &anItem |
The record to remove
|
TRequestStatus &aStat |
Indicates asynchronous operation and on completion contains an error code: see the system-wide error codes.
|
|
Capability: |
Dependent |
on the type of connection so deferred to PRT |
IMPORT_C TInt Remove(const TDesC8 &anItem);
Description
Removes a record from the database.
Parameters
const TDesC8 &anItem |
The record to remove
|
|
Return value
TInt
|
KErrNone if successful otherwise another of the system-wide error codes.
|
|
IMPORT_C void Close();
Description
Closes a database access service. If a service has been opened using RNetDatabase::Open(RSocketServ &,TUint,TUint)
, then it should be closed using RNetDatabase::Close()
. This will ensure all associated resources are released.
IMPORT_C void Cancel();
Description
Cancels any outstanding asynchronous calls, which will return with error code KErrCancel.