| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/Oracle/OCI/include/ocixmldb.h
Go to the documentation of this file.

    00001 /* Copyright (c) 2003, Oracle Corporation.  All rights reserved.  */
    00002
    00003 /*
    00004    NAME
    00005      ocixmldb.h - XDB public functions
    00006
    00007    DESCRIPTION
    00008      This file contains XDB specific public functions required for DOM C-API.
    00009
    00010    RELATED DOCUMENTS
    00011
    00012
    00013    EXPORT FUNCTION(S)
    00014    struct xmlctx *OCIXmlDbInitXmlCtx(OCIEnv *, OCISvcCtx *, OCIError *,
    00015                                ocixmldbparam *params, int num_params);
    00016
    00017    void    OCIXmlDbFreeXmlCtx(struct xmlctx *xctx);
    00018
    00019
    00020   ------------------------------------------------------------------------
    00021    EXAMPLES
    00022
    00023    NOTES
    00024
    00025    MODIFIED   (MM/DD/YY)
    00026    ataracha    05/28/03 - change names
    00027    ataracha    02/18/03 - add oratypes, remove XMLERR_*
    00028    imacky      02/01/03 - remove xml.h; xdbs fix
    00029    ataracha    01/24/03 - use "struct xmlctx" instead of xmlctx
    00030    imacky      01/28/03 - fix XMLERR defs
    00031    ataracha    01/21/03 - ataracha_uni_capi_cleanup
    00032    ataracha    01/09/03 - Creation
    00033
    00034 */
    00035
    00036 #ifndef ORATYPES
    00037 #include <oratypes.h>
    00038 #endif
    00039
    00040 #ifndef OCI_ORACLE
    00041 # include <oci.h>
    00042 #endif
    00043
    00044 #ifndef OCIXMLDB_ORACLE
    00045 # define OCIXMLDB_ORACLE
    00046
    00047
    00048 /*---------------------------------------------------------------------------
    00049                      PUBLIC TYPES AND CONSTANTS
    00050   ---------------------------------------------------------------------------*/
    00051
    00052 #ifndef XMLCTX_DEFINED
    00053 # define XMLCTX_DEFINED
    00054 /* DATATYPE xmlctx - XML top-level context
    00055 */
    00056 struct xmlctx; typedef struct xmlctx xmlctx;
    00057 #endif
    00058
    00059 typedef enum
    00060 {
    00061   XCTXINIT_OCIDUR  = 1,
    00062   XCTXINIT_ERRHDL  = 2
    00063 } ocixmldbpname;
    00064
    00065 typedef struct ocixmldbparam
    00066 {
    00067   ocixmldbpname   name_ocixmldbparam;
    00068   void           *value_ocixmldbparam;
    00069 } ocixmldbparam;
    00070
    00071 #define NUM_OCIXMLDBPARAMS 2
    00072
    00073 /*---------------------------------------------------------------------------
    00074                      PRIVATE TYPES AND CONSTANTS
    00075   ---------------------------------------------------------------------------*/
    00076
    00077
    00078 /*---------------------------------------------------------------------------
    00079                            EXPORT FUNCTIONS
    00080   ---------------------------------------------------------------------------*/
    00081 /*****************************************************************************
    00082                               DESCRIPTION
    00083
    00084 -----------------------------OCIXmlDbInitXmlCtx---------------------------------
    00085 Name
    00086 OCIXmlDbInitXmlCtx
    00087 Purpose
    00088 To get a xmlctx structure initialized with error-handler and XDB callbacks.
    00089 Syntax
    00090 struct xmlctx *OCIXmlDbInitXmlCtx (OCIEnv           *envhp,
    00091                                  OCISvcCtx        *svchp,
    00092                                  OCIError         *err,
    00093                                  params_ocixmldb *params,
    00094                                  int               num_params);
    00095 Parameters
    00096 envhp (IN) - The OCI environment handle
    00097 svchp (IN) - The OCI service handle
    00098 errhp (IN) - The OCI error handle
    00099 params (IN)- This contains the following optional parameters :
    00100    (a) OCIDuration dur (IN - The OCI Duration (Default: OCI_DURATION_SESSION)
    00101    (b) void (*err_handler) (sword, (const oratext *) (IN) -
    00102        Pointer to the error handling function (Default: null)
    00103 num_params (IN) - Number of parameters to be read from parameter params.
    00104                   If the value of num_params exceeds the size of array
    00105                   "params", unexpected behavior will result.
    00106
    00107 Returns
    00108 A pointer to xmlctx structure, with xdb context, error handler and callbacks
    00109 populated with appropriate values. This is later used for all API calls. NULL
    00110 if no database connection available.
    00111
    00112 -----------------------------OCIXmlDbFreeXmlCtx----------------------------
    00113 Name
    00114 OCIXmlDbFreeXmlCtx
    00115 Pupose
    00116 To free any allocations done during OCIXmlDbInitXmlCtx.
    00117 Syntax
    00118 void OCIXmlDbFreeXmlCtx (struct xmlctx *xctx)
    00119 Parameters
    00120 xctx (IN) - The xmlctx to terminate
    00121 Returns
    00122 -
    00123 ******************************************************************************/
    00124
    00125 struct xmlctx *OCIXmlDb_CtxInit(OCIEnv *, OCISvcCtx *, OCIError *,
    00126                             ocixmldbparam *, int);
    00127
    00128 void    OCIXmlDb_CtxFree(struct xmlctx *xctx);
    00129
    00130 struct xmlctx *OCIXmlDbInitXmlCtx(OCIEnv *, OCISvcCtx *, OCIError *,
    00131                             ocixmldbparam *, int);
    00132
    00133 void    OCIXmlDbFreeXmlCtx(struct xmlctx *xctx);
    00134 /*---------------------------------------------------------------------------
    00135                           INTERNAL FUNCTIONS
    00136   ---------------------------------------------------------------------------*/
    00137
    00138
    00139 #endif                                              /* OCIXMLDB_ORACLE */

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines