#include <es_sock.h>
Link against: esock.lib
class RNetDatabase : public RSubSessionBase |
Public Member Functions | |
---|---|
IMPORT_C void | Add(const TDesC8 &, TRequestStatus &) |
IMPORT_C TInt | Add(const TDesC8 &) |
IMPORT_C void | Cancel() |
IMPORT_C void | Close() |
IMPORT_C TInt | Open(RSocketServ &, TUint, TUint) |
IMPORT_C void | Query(const TDesC8 &, TDes8 &, TRequestStatus &) |
IMPORT_C TInt | Query(const TDesC8 &, TDes8 &) |
IMPORT_C void | Remove(const TDesC8 &, TRequestStatus &) |
IMPORT_C TInt | Remove(const TDesC8 &) |
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.
IMPORT_C void | Add | ( | const TDesC8 & | anItem, |
TRequestStatus & | aStat | |||
) |
Adds a record to the database asynchronously.
Parameters | |
---|---|
anItem | The record to add |
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 void | Cancel | ( | ) |
Cancels any outstanding asynchronous calls, which will return with error code KErrCancel.
IMPORT_C TInt | Open | ( | RSocketServ & | aSocketServer, |
TUint | anAddrFamily, | |||
TUint | aProtocol | |||
) |
Initialises a database access service provided by a particular protocol. It must be called before other object functions are used.
Parameters | |
---|---|
aSocketServer | The socket server session |
anAddrFamily | A constant identifying the protocol family |
aProtocol | A constant that identifies the protocol that provides the database access service |
IMPORT_C void | Query | ( | const TDesC8 & | aQuery, |
TDes8 & | aResult, | |||
TRequestStatus & | aStat | |||
) |
Makes a query to the database asynchronously.
Parameters | |
---|---|
aQuery | The query to perform |
aResult | The result of the query |
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 |
Makes a query to the database.
Parameters | |
---|---|
aQuery | The query to perform |
aResult | The result of the query |
Capability | |
---|---|
Dependent | on the type of connection so deferred to PRT |
IMPORT_C void | Remove | ( | const TDesC8 & | anItem, |
TRequestStatus & | aStat | |||
) |
Removes a record from the database asynchronously.
Parameters | |
---|---|
anItem | The record to remove |
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 |