Optim Data Privacy Providers  11.3.0
 All Data Structures Files Functions Variables Macros Groups Pages
Data Structures | Macros | Functions
ODPPCmnApiX.h File Reference
#include "ODPPCmnAPI.h"
Include dependency graph for ODPPCmnApiX.h:

Go to the source code of this file.

Data Structures

struct  DP_FIELD_DEF_X
 
struct  DP_INIT_OP_DEF_X
 
struct  DP_SVC_DEF_X
 
struct  DP_SRCCOL_DEF_X
 
struct  DP_BLK_DEF_X
 
struct  DP_LDS_FLD_DEF_X
 
struct  DP_LDS_ROW_DEF_X
 

Macros

#define DP_FIELD_DEF_X_EC   "FLDX"
 
#define DP_INIT_OP_DEF_X_EC   "OPRX"
 
#define DP_SVC_DEF_X_EC   "SVCX"
 
#define DP_PRV_DEF_X_EC   "PRVX"
 
#define DP_BLK_DEF_X_EC   "BLKX"
 
#define DP_LDS_FLD_DEF_X_EC   "LFLX"
 
#define DP_LDS_ROW_DEF_X_EC   "LDRX"
 

Functions

RETVAL Init (DP_BLK_DEF_X *pCtrlBlk, DP_SVC_DEF_X *pSvcDef)
 
RETVAL Service (short sMethod, DP_BLK_DEF_X *pCtrlBlk, DP_ROWSET_DEF *pRowSet)
 
RETVAL Terminate (DP_BLK_DEF_X *pCtrlBlk)
 
RETVAL GetInfo (DP_BLK_DEF_X *pCtrlBlk, short sRequest, void *ptr, int *pBufLen)
 
RETVAL ODPPLDSEnvInit (void)
 
RETVAL ODPPLDSConnect (DP_BLK_DEF_X *pCtrlBlk, int *pLdsToken, DP_INIT_OP_DEF_X *pOperands, short sOprCount)
 
RETVAL ODPPLDSDisconnect (int iLdsToken)
 
RETVAL ODPPLDSGetData (int iLdsToken, DP_LDS_FLD_DEF_X *pSearchCols, DP_LDS_ROW_DEF_X *pDstRows, DP_INIT_OP_DEF_X *pOperands, short sOprCount, int iMaxRows, char bFetchMultiple, int *pRowsFetched)
 
RETVAL ODPPLDSCloseFetch (int iLdsToken)
 
RETVAL ODPPLDSGetColInfo (int iLdsToken, DP_LDS_FLD_DEF_X *pLdsColDefs, short sFldCount, DP_INIT_OP_DEF_X *pOperands, short sOprCount)
 

Detailed Description

-----------------------------------------------------------------------------
File Name:  ODPPCmnApiX.H

Purpose:    Provides the declarations for user written ODPP service providers,
            including the function and structure declarations. This file will
            be used by developers writing their own ODPP service providers
            
Functions:

   Name              Purpose

Structures:

   Name              Purpose

Author:
   IBM Optim
-----------------------------------------------------------------------------

Macro Definition Documentation

#define DP_FIELD_DEF_X_EC   "FLDX"

Eye catcher for DP_FIELD_DEF_X

#define DP_INIT_OP_DEF_X_EC   "OPRX"

Eye catcher for DP_INIT_OP_DEF_X

#define DP_SVC_DEF_X_EC   "SVCX"

Eye catcher for DP_SVC_DEF_X

#define DP_PRV_DEF_X_EC   "PRVX"

Eye catcher for DP_PRV_DEF_X

#define DP_BLK_DEF_X_EC   "BLKX"

Eye catcher for DP_BLK_DEF_X

#define DP_LDS_FLD_DEF_X_EC   "LFLX"

Eye catcher for DP_LDS_FLD_DEF_X_EC

#define DP_LDS_ROW_DEF_X_EC   "LDRX"

Eye catcher for DP_LDS_ROW_DEF_X

Function Documentation

RETVAL Init ( DP_BLK_DEF_X pCtrlBlk,
DP_SVC_DEF_X pSvcDef 
)

Initializes the service provider. This function initializes the provider specific control block and assigns to framework control block.

Parameters
pCtrlBlkPointer to the Control Block supplied by the framework.

pSvcDefService Block supplied by the user contains all initialization parameter for the provider. It contains all the attributes that a Service needs to perform the requested function. This will initialize the internal variables of the Service Provider required for validating the data and executing the service routine(s). All the Services will share this common Control Block for initialization. Service Provider specific flags and attributes will be provided by means of parameters in the parameter list.

Returns
Returns ODPPSUCCESS if successful or a valid error code on failure.

Example

RETVAL Service ( short  sMethod,
DP_BLK_DEF_X pCtrlBlk,
DP_ROWSET_DEF pRowSet 
)

Service routine to perform masking. Accepts a list of records(rows), loops through all of rows masking them one by one. It performs the arithmatic operation and put results back into destination buffer.

Parameters
sMethodMethod to override the masking method setting supplied during Init.

pCtrlBlkPointer to the Control Block supplied by the framework.

pRowSetRecords list.

Returns
ODPPSUCCESS Successful without any row failure or information
ODPPSUCESS_WITH_INFO Successful with some row failures or information
FAILURE can return various error codes depending upon the error.

Example

RETVAL Terminate ( DP_BLK_DEF_X pCtrlBlk)

Terminates the service provider. Deallocates all allocated memory and resources.

Parameters
pCtrlBlkControl Block supplied by the Framework which holds the provider specific control block.

Returns
Returns ODPPSUCCESS if successful or a valid error code on failure.

Example

RETVAL GetInfo ( DP_BLK_DEF_X pCtrlBlk,
short  sRequest,
void *  ptr,
int *  pBufLen 
)

Returns the Source Indexes and destination Index information requested by the caller.

Parameters
pCtrlBlkPointer to the Control block for this service provider

sRequestRequest ID sent by the caller

ptrmemory block pointer to copy the return data Provider will not make any attempt to verify the buffer or its length or its type it will simple copy the data into the buffer caller has to ensure that buffer is allocated sufficient memory to hold return data.

pBufLenSize of the buffer pointed by parameter pts in bytes.

Returns
Returns ODPPSUCCESS if successful or a valid error code on failure.

Example

RETVAL ODPPLDSEnvInit ( void  )

Intializes the Lookup Data Source library

Returns
Returns ODPPSUCCESS if successful or a valid error code on failure.
RETVAL ODPPLDSConnect ( DP_BLK_DEF_X pCtrlBlk,
int *  pLdsToken,
DP_INIT_OP_DEF_X pOperands,
short  sOprCount 
)

Creates a connection to the data source

Parameters
pCtrlBlkPointer to the Control block for this service provider

pLdsTokenInteger pointer that represents the LDS TOKEN required on subsequent session calls.

pOperandsPointer to the DP_INIT_OP_DEF_X block which contains all the initialization parameter for the Lookup service provider.
sOprCountCount of total number of initialization parameter

Returns
Returns ODPPSUCCESS if successful or a valid error code on failure.
RETVAL ODPPLDSDisconnect ( int  iLdsToken)

Disconnects from the data source.

Parameters
iLdsTokenLDS TOKEN for the current session.
Returns
Returns ODPPSUCCESS if successful or a valid error code on failure.
RETVAL ODPPLDSGetData ( int  iLdsToken,
DP_LDS_FLD_DEF_X pSearchCols,
DP_LDS_ROW_DEF_X pDstRows,
DP_INIT_OP_DEF_X pOperands,
short  sOprCount,
int  iMaxRows,
char  bFetchMultiple,
int *  pRowsFetched 
)

Fetches data from the replacement data store. This function can also be utilized to fetch any data by supplying a blank column and a complete where clause string in the data buffer. Currently this function can only return 1 row on each call.

Parameters
iLdsTokenLDS TOKEN for the current session.

pSearchColsPointer to the chain of DP_LDS_FLD_DEF_X search column(s)
pDstRowsPointer to the chain of DP_LDS_ROW_DEF_X row(s).
pOperandsPointer to the DP_INIT_OP_DEF_X block which contains all the initialization parameter for the Lookup service provider.
sOprCountCount of total number of initialization parameter
iMaxRowsCount of total number of rows #pDstRows is pointing
bFetchMultipleTRUE if multiple rows needs to fetch.
pRowsFetchedInteger pointer contains Count of total number of rows fetched.
Returns
Returns ODPPSUCCESS if successful or a valid error code on failure.
RETVAL ODPPLDSCloseFetch ( int  iLdsToken)

Closes what was opened to fetch data in call to ODPPLDSGetData like statement buffers etc.

Parameters
iLdsTokenLDS TOKEN for the current session.

Returns
Returns ODPPSUCCESS if successful or a valid error code on failure.
RETVAL ODPPLDSGetColInfo ( int  iLdsToken,
DP_LDS_FLD_DEF_X pLdsColDefs,
short  sFldCount,
DP_INIT_OP_DEF_X pOperands,
short  sOprCount 
)

Retrieves column infromation like datatype, length, precesion, scale etc.

Parameters
iLdsTokenLDS TOKEN for the current session.

pLdsColDefsPointer to the chain of DP_LDS_FLD_DEF_X for which information is required.

sFldCountCount of the total number of element pLdsColDefs is pointing.

pOperandsPointer to the DP_INIT_OP_DEF_X block which contains all the initialization parameter for the Lookup service provider.
sOprCountCount of total number of initialization parameter
Returns
Returns ODPPSUCCESS if successful or a valid error code on failure.