Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6dbc.h
Go to the documentation of this file.
1 
10 #ifndef P6DBC_H__
11 #define P6DBC_H__ 1
12 
13 #include "p6com.h"
14 #include "p6dbcstmt.h"
15 #include "p6crypto.h"
16 #include "p6sign.h"
17 #include "p6cryptokey.h"
18 
19 
20 
21 namespace P6R {
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
32 typedef enum
33 {
34  P6DBC_CONNECT = 0x00,
35  P6DBC_COMMIT = 0x01,
37 } P6DBCREQUEST;
38 
50 typedef P6VOID (*P6DBCRESULT)( P6DBCREQUEST requestCode, P6ERR resultCode, P6VOID* pCtx );
51 
69 const P6DBCFLAGS P6DBC_NOFLAGS = 0x00000000;
70 const P6DBCFLAGS P6DBC_RECOVERBADSIG = 0x00000002;
71 const P6DBCFLAGS P6DBC_DISABLECOMPAT = 0x00000004;
72 
73 
79 interface p6IDBC : public p6ICom
80 {
95  P6COMMETHOD initialize( P6DBCFLAGS flags, P6UINT32 numThreads, const P6WCHAR* pPath ) = 0;
96 
123  P6COMMETHOD connect( const P6WCHAR* pURI, P6DBCRESULT pfn, P6VOID* pCtx ) = 0;
124 
167  P6COMMETHOD connectSigned( const P6WCHAR* pURI,
168  P6SIGNHMAC signAlg,
169  p6ICryptoKey* pSignKey,
170  P6DBCRESULT pfn,
171  P6VOID* pCtx ) = 0;
172 
182  P6COMMETHOD close() = 0;
183 
213  P6COMMETHOD prepare( const P6WCHAR* pSql, p6IDBCStmt** pStatement ) = 0;
214 };
215 
216 // {68B5FA6C-7FEE-41e6-A142-4F3BE720BC59}
217 #define IF_p6IDBC {0x68b5fa6c,0x7fee,0x41e6,{0xa1,0x42,0x4f,0x3b,0xe7,0x20,0xbc,0x59}}
218 
219 // {2D112140-B216-4891-AC38-FB2CA08E584E}
220 #define COMP_p6DBC {0x2d112140,0xb216,0x4891,{0xac,0x38,0xfb,0x2c,0xa0,0x8e,0x58,0x4e}}
221 
222 #ifdef __cplusplus
223 }
224 #endif
225 
226 } // namespace
227 
228 
229 #endif
230 
231 
232 
233 
234 
235 
P6SIGNHMAC
Supported HMAC algorthms for signing:
Definition: p6sign.h:46
virtual P6R::P6ERR connect(const P6WCHAR *pURI, P6DBCRESULT pfn, P6VOID *pCtx)=0
Open a connection to the database at the 'pURI' location.
virtual P6R::P6ERR connectSigned(const P6WCHAR *pURI, P6SIGNHMAC signAlg, p6ICryptoKey *pSignKey, P6DBCRESULT pfn, P6VOID *pCtx)=0
This method performs the same function as connect() with the added capability of digitally signing th...
Cryptography component definitions.
This interface provides key metadata infrormation and key access.
Definition: p6cryptokey.h:787
unsigned int P6UINT32
Definition: p6types.h:40
P6UINT32 P6DBCFLAGS
P6DBCFLAGS.
Definition: p6dbc.h:68
This interface supports the creation of a prepared statement which allows binding of values to variab...
Definition: p6dbcstmt.h:45
This interface allows the caller to connect to any of several different backend database servers (bot...
Definition: p6dbc.h:79
const P6DBCFLAGS P6DBC_DISABLECOMPAT
Definition: p6dbc.h:71
const P6DBCFLAGS P6DBC_NOFLAGS
Definition: p6dbc.h:69
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:76
const P6DBCFLAGS P6DBC_RECOVERBADSIG
Definition: p6dbc.h:70
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:96
P6R's database Query Statement Interface.
virtual P6R::P6ERR initialize(P6DBCFLAGS flags, P6UINT32 numThreads, const P6WCHAR *pPath)=0
Sets up the component to run properly.
P6DBCREQUEST
Result of a asynchronous call to connect, commit, or rollback.
Definition: p6dbc.h:32
P6UINT32 P6ERR
COM err return type see P6ERR.h.
Definition: p6types.h:109
#define P6COMMETHOD
Definition: p6types.h:872
virtual P6R::P6ERR prepare(const P6WCHAR *pSql, p6IDBCStmt **pStatement)=0
Prepare an SQL query to be run against the database.
P6COM definitions and interfaces.
Interface definition for the cryptographic signature generation and verification. ...
void P6VOID
Definition: p6types.h:75
P6VOID(* P6DBCRESULT)(P6DBCREQUEST requestCode, P6ERR resultCode, P6VOID *pCtx)
P6DBCRESULT.
Definition: p6dbc.h:50
virtual P6R::P6ERR close()=0
Close the currently open connection to the database server defined in a previous connect() call...
P6R Cryptographic key interface definitions.