本文整理汇总了C++中CInterface类的典型用法代码示例。如果您正苦于以下问题:C++ CInterface类的具体用法?C++ CInterface怎么用?C++ CInterface使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CInterface类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UPDATECONTEXT_IOMessage
void
UPDATECONTEXT_IOMessage(
/* In */ CEE_tag_def objtag_
, /* In */ const CEE_handle_def *call_id_
)
{
CInterface* pnode = (CInterface*)objtag_;
CEE_status sts = CEE_SUCCESS;
CEE_status retcode;
SRVR_CONTEXT_def *srvrContext;
long* param[1];
retcode = decodeParameters(1, param, pnode->r_buffer(), pnode->r_buffer_length());
if (retcode != CEE_SUCCESS)
{
//LCOV_EXCL_START
strcpy( errStrBuf2, "odbcs_srvr.cpp");
strcpy( errStrBuf3, "SRVR-UPDATECONTEXT_IOMessage");
strcpy( errStrBuf4, "buffer overflow");
sprintf( errStrBuf5, "retcode <%d>", retcode);
logError( PROGRAM_ERROR, SEVERITY_MAJOR, CAPTURE_ALL + PROCESS_STOP );
exit(1000);
//LCOV_EXCL_STOP
}
srvrContext = (SRVR_CONTEXT_def*)param[0];
odbc_SQLSvc_UpdateServerContext_ame_(
objtag_
, call_id_
, srvrContext
);
}
示例2: odbc_SQLSvc_TerminateDialogue_ts_res_
CEE_status
odbc_SQLSvc_TerminateDialogue_ts_res_(
/* In */ CEE_tag_def objtag_
, /* In */ const CEE_handle_def *call_id_
, /* In */ const struct odbc_SQLSvc_TerminateDialogue_exc_ *exception_
)
{
SRVRTRACE_ENTER(FILE_OIOM+2);
CInterface* pnode = (CInterface*)objtag_;
CEE_status sts = CEE_SUCCESS;
CEERCV_IOMessage_exc_ RCVexception_;
IDL_short error;
short reply_count;
CEERCV_IOMessage_reply_seq_ reply;
char* buffer = NULL;
UInt32 message_length = 0;
sts = odbc_SQLSvc_TerminateDialogue_param_res_(
pnode
, buffer
, message_length
, exception_
);
if (sts == CEE_SUCCESS)
sts = pnode->send_response(buffer, message_length, call_id_);
SRVRTRACE_EXIT(FILE_OIOM+2);
return sts;
}
示例3: MONITORCALL_IOMessage
void
MONITORCALL_IOMessage(
/* In */ CEE_tag_def objtag_
, /* In */ const CEE_handle_def *call_id_
)
{
CInterface* pnode = (CInterface*)objtag_;
CEE_status sts = CEE_SUCCESS;
CEE_status retcode;
DIALOGUE_ID_def dialogueId;
long* param[1];
retcode = decodeParameters(1, param, pnode->r_buffer(), pnode->r_buffer_length());
if (retcode != CEE_SUCCESS)
{
//LCOV_EXCL_START
strcpy( errStrBuf2, "odbcs_srvr.cpp");
strcpy( errStrBuf3, "SRVR-MONITORCALL_IOMessage");
strcpy( errStrBuf4, "buffer overflow");
sprintf( errStrBuf5, "retcode <%d>", retcode);
logError( PROGRAM_ERROR, SEVERITY_MAJOR, CAPTURE_ALL + PROCESS_STOP );
exit(1000);
//LCOV_EXCL_STOP
}
dialogueId = *(IDL_long*)param[0];
odbc_SQLSvc_MonitorCall_ame_(
objtag_
, call_id_
, dialogueId
);
}
示例4: SQLDISCONNECT_IOMessage
void
SQLDISCONNECT_IOMessage(
/* In */ CEE_tag_def objtag_
, /* In */ const CEE_handle_def *call_id_
)
{
CInterface* pnode = (CInterface*)objtag_;
CEE_status sts = CEE_SUCCESS;
CEE_status retcode;
char *curptr;
DIALOGUE_ID_def dialogueId;
curptr = pnode->r_buffer();
// Copy 1st Parameter
// copy dailogueId
dialogueId = *(IDL_long *)(curptr);
odbc_SQLSvc_TerminateDialogue_ame_(
objtag_
, call_id_
, dialogueId
);
}
示例5: odbc_SQLSrvr_UpdateLob_ts_res_
void
odbc_SQLSrvr_UpdateLob_ts_res_(
/* In */ CEE_tag_def objtag_
, /* In */ const CEE_handle_def * call_id_
, /* In */ const struct odbc_SQLSvc_UpdateLob_exc_ * exception_
)
{
CInterface * pnode = (CInterface *) objtag_;
CEE_status sts = CEE_SUCCESS;
IDL_short error;
CEERCV_IOMessage_reply_seq_ reply;
char * buffer = NULL;
UInt32 message_length = 0;
sts = odbc_SQLsrvr_UpdateLob_param_res_(
pnode
, buffer
, message_length
, exception_
);
if (sts == CEE_SUCCESS)
sts = pnode->send_response(buffer, message_length, call_id_);
}
示例6: SQLENDTRAN_IOMessage
void
SQLENDTRAN_IOMessage(
/* In */ CEE_tag_def objtag_
, /* In */ const CEE_handle_def *call_id_
)
{
CInterface* pnode = (CInterface*)objtag_;
CEE_status sts = CEE_SUCCESS;
CEE_status retcode;
IDL_char *curptr;
IDL_long inputPosition = 0;
DIALOGUE_ID_def dialogueId;
IDL_unsigned_short transactionOpt;
curptr = pnode->r_buffer();
dialogueId = *(IDL_long*)(curptr+inputPosition);
inputPosition += sizeof(dialogueId);
transactionOpt = *(IDL_unsigned_short*)(curptr+inputPosition);
inputPosition += sizeof(transactionOpt);
odbc_SQLSrvr_EndTransaction_ame_(
objtag_
, call_id_
, dialogueId
, transactionOpt);
} // SQLENDTRAN_IOMessage()
示例7: odbc_SQLSrvr_EndTransaction_ts_res_
CEE_status
odbc_SQLSrvr_EndTransaction_ts_res_(
/* In */ CEE_tag_def objtag_
, /* In */ const CEE_handle_def *call_id_
, /* In */ const struct odbc_SQLSvc_EndTransaction_exc_ *exception_
, /* In */ ERROR_DESC_LIST_def *sqlWarning
)
{
SRVRTRACE_ENTER(FILE_OIOM+13);
CInterface* pnode = (CInterface*)objtag_;
CEE_status sts = CEE_SUCCESS;
CEERCV_IOMessage_exc_ RCVexception_;
IDL_short error;
short reply_count;
CEERCV_IOMessage_reply_seq_ reply;
char* buffer = NULL;
UInt32 message_length = 0;
odbc_SQLSrvr_EndTransaction_param_res_(
pnode
, buffer
, message_length
, exception_
, sqlWarning
);
if (sts == CEE_SUCCESS)
sts = pnode->send_response(buffer, message_length, call_id_);
SRVRTRACE_EXIT(FILE_OIOM+13);
return sts;
} // odbc_SQLSrvr_EndTransaction_ts_res_()
示例8: odbc_SQLSrvr_SetConnectionOption_ts_res_
CEE_status
odbc_SQLSrvr_SetConnectionOption_ts_res_(
/* In */ CEE_tag_def objtag_
, /* In */ const CEE_handle_def *call_id_
, /* In */ const struct odbc_SQLSvc_SetConnectionOption_exc_ *exception_
, /* In */ ERROR_DESC_LIST_def *sqlWarning
)
{
SRVRTRACE_ENTER(FILE_OIOM+3);
CInterface* pnode = (CInterface*)objtag_;
CEE_status sts = CEE_SUCCESS;
IDL_char* buffer = NULL;
IDL_unsigned_long message_length = 0;
sts = odbc_SQLSrvr_SetConnectionOption_param_res_(
pnode
, buffer
, message_length
, exception_
, sqlWarning
);
if (sts == CEE_SUCCESS)
sts = pnode->send_response(buffer, message_length, call_id_);
SRVRTRACE_EXIT(FILE_OIOM+3);
return sts;
}
示例9: CAutoLibrary
void CInterfaceManager::Load()
{
m_oMutex.Enter();
if(m_pAutoLibrary == NULL)
{
uint32 i, nCount;
CString oLibDir;
const char* sAppHome = CFilePathInfo::GetInstance()->GetHome();
oLibDir += sAppHome;
oLibDir += "/lib/";
oLibDir += m_sLibDir;
m_pAutoLibrary = new CAutoLibrary(oLibDir.GetStr());
nCount = m_oInterfaces.GetSize();
for(i=nCount; i; --i)
{
CInterface* pInterface = m_oInterfaces[i-1];
if(QueryInterface(pInterface->GetInterfaceName()) != pInterface)
{
m_oMutex.Leave();
FocpAbort(( "re-register interface :%s", pInterface->GetInterfaceName()));
}
}
}
m_oMutex.Leave();
}
示例10: odbc_SQLSrvr_Close_ts_res_
CEE_status
odbc_SQLSrvr_Close_ts_res_(
/* In */ CEE_tag_def objtag_
, /* In */ const CEE_handle_def *call_id_
, /* In */ IDL_long returnCode
, /* In */ IDL_long rowsAffected
, /* In */ IDL_long sqlWarningOrErrorLength
, /* In */ BYTE *sqlWarningOrError
)
{
SRVRTRACE_ENTER(FILE_OIOM+12);
CInterface* pnode = (CInterface*)objtag_;
CEE_status sts = CEE_SUCCESS;
IDL_char* buffer = NULL;
IDL_unsigned_long message_length = 0;
odbc_SQLSrvr_Close_param_res_(
pnode
, buffer
, message_length
, returnCode
, sqlWarningOrErrorLength
, sqlWarningOrError
, rowsAffected
);
if (sts == CEE_SUCCESS)
sts = pnode->send_response(buffer, message_length, call_id_);
SRVRTRACE_EXIT(FILE_OIOM+12);
return sts;
}
示例11: main
int main( int argc, char **argv )
{
CInterface interface;
interface.init();
interface.async_call_this_method_run_in_ioservice_thead(100, callback_func);
getchar();
interface.uninit();
return 0;
}
示例12: throwError
v8::Handle<v8::Value> V8CInterface::getPlatformMethodCustom(const v8::Arguments& args)
{
CInterface* imp = V8CInterface::toNative(args.Holder());
RefPtr<CPlatform> cPlatform = imp->getPlatform();
if (!cPlatform)
return throwError(v8SyntaxError, "Cannot create new CPlatform object.", args.GetIsolate());
if (!openclFlag)
return throwError(v8SyntaxError, "Cannot call getPlatform when OpenCL is not loaded.", args.GetIsolate());
return toV8(cPlatform.get(), v8::Handle<v8::Object>(), args.GetIsolate());
}
示例13: main
int main(const int argc, const char **argv) {
std::stringstream usage;
std::string cc = "";
// hash map for fetching options data
options_map op_data;
try {
// process command line arguments and 'usage' should contain
// the usage message.
OptionParser op(argc, argv, usage);
int rval = op.processOptions(op_data);
if (rval == 0) {
// fetch user input from the interfacing code
CInterface ci;
// yes means load readline support
cc = ci.getUserInput(op_data["r"] == "yes");
} else if (rval == 2) {
std::cout << usage.str();
return 0;
}
} catch (po::error & e) {
std::cout << "Invalid options passed ...\n";
std::cout << usage.str();
return 1;
}
// add data meant to be appended to the beginning
cc = op_data["a"] + "\n" + cc;
// remove beginning and trailing whitespaces with custom function
cc = Utility::trim(cc);
// write to file only if content is not totally blank
if (!cc.empty()) {
Journal journal;
journal.takeNote(cc);
std::string dateformat = op_data["d"];
if (dateformat.begin() == dateformat.end()) {
dateformat = "%d/%m/%Y-%H:%M:%S";
}
journal.saveNote(dateformat);
}
return 0;
}
示例14: odbc_SQLSrvr_Execute_ts_res_
CEE_status
odbc_SQLSrvr_Execute_ts_res_(
/* In */ CEE_tag_def objtag_
, /* In */ const CEE_handle_def *call_id_
, /* In */ IDL_long returnCode
, /* In */ IDL_long sqlWarningOrErrorLength
, /* In */ BYTE *sqlWarningOrError
, /* In */ IDL_long rowsReturned
, /* In */ IDL_long sqlQueryType
, /* In */ IDL_long estimatedCost
, /* In */ IDL_long outValuesLength
, /* In */ BYTE *outValues
, /* In */ IDL_long outputDescLength // Used with execdirect
, /* In */ BYTE *outputDesc // Used with execdirect
, /* In */ Long stmtHandle // Used for SPJ result sets
, /* In */ IDL_long stmtHandleKey
)
{
SRVRTRACE_ENTER(FILE_OIOM+23);
CInterface *pnode = (CInterface*)objtag_;
CEE_status sts = CEE_SUCCESS;
CEERCV_IOMessage_exc_ RCVexception_;
IDL_short error;
short reply_count;
CEERCV_IOMessage_reply_seq_ reply;
char *buffer = NULL;
UInt32 message_length = 0;
odbc_SQLSrvr_Execute_param_res_( pnode
, buffer
, message_length
, returnCode
, sqlWarningOrErrorLength
, sqlWarningOrError
, rowsReturned
, sqlQueryType
, estimatedCost
, outValuesLength
, outValues
, outputDescLength
, outputDesc
, stmtHandle
, stmtHandleKey
);
if (sts == CEE_SUCCESS)
sts = pnode->send_response(buffer, message_length, call_id_);
SRVRTRACE_EXIT(FILE_OIOM+11);
return sts;
} // end odbc_SQLSrvr_Execute_ts_res_
示例15: odbc_SQLSrvr_Prepare_ts_res_
CEE_status
odbc_SQLSrvr_Prepare_ts_res_(
/* In */ CEE_tag_def objtag_
, /* In */ const CEE_handle_def *call_id_
, /* In */ IDL_long returnCode
, /* In */ IDL_long sqlWarningOrErrorLength
, /* In */ BYTE *sqlWarningOrError
, /* In */ IDL_long sqlQueryType
, /* In */ IDL_long stmtHandleKey
, /* In */ IDL_long estimatedCost
, /* In */ IDL_long inputDescLength
, /* In */ BYTE *inputDesc
, /* In */ IDL_long outputDescLength
, /* In */ BYTE *outputDesc
)
{
SRVRTRACE_ENTER(FILE_OIOM+11);
CInterface* pnode = (CInterface*)objtag_;
CEE_status sts = CEE_SUCCESS;
CEERCV_IOMessage_exc_ RCVexception_;
IDL_short error;
short reply_count;
CEERCV_IOMessage_reply_seq_ reply;
char* buffer = NULL;
UInt32 message_length = 0;
odbc_SQLSrvr_Prepare_param_res_(
pnode
, buffer
, message_length
, returnCode
, sqlWarningOrErrorLength
, sqlWarningOrError
, sqlQueryType
, stmtHandleKey
, estimatedCost
, inputDescLength
, inputDesc
, outputDescLength
, outputDesc
);
if (sts == CEE_SUCCESS)
{
sts = pnode->send_response(buffer, message_length, call_id_);
}
SRVRTRACE_EXIT(FILE_OIOM+11);
return sts;
} /* odbc_SQLSrvr_Prepare_ts_res_() */