本文整理汇总了C++中CMSetStatus函数的典型用法代码示例。如果您正苦于以下问题:C++ CMSetStatus函数的具体用法?C++ CMSetStatus怎么用?C++ CMSetStatus使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CMSetStatus函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: __new_enumeration
static struct native_enum * __new_enumeration (
int mm_add,
CMPIArray * array,
CMPIStatus * rc )
{
static CMPIEnumerationFT eft = {
NATIVE_FT_VERSION,
__eft_release,
__eft_clone,
__eft_getNext,
__eft_hasNext,
__eft_toArray
};
static CMPIEnumeration e = {
"CMPIEnumeration",
&eft
};
struct native_enum * enumeration =
(struct native_enum *)
tool_mm_alloc ( mm_add, sizeof ( struct native_enum ) );
enumeration->enumeration = e;
enumeration->mem_state = mm_add;
enumeration->data =
( mm_add == TOOL_MM_NO_ADD )?
CMClone ( array, rc ): array;
CMSetStatus ( rc, CMPI_RC_OK );
return enumeration;
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:31,代码来源:enumeration.c
示例2: __eft_clone
static CMPIEnumeration * __eft_clone (
CONST CMPIEnumeration * enumeration,
CMPIStatus * rc )
{
CMPIStatus tmp;
struct native_enum * e = (struct native_enum *) enumeration;
CMPIArray * data;
if (!checkArgs(enumeration, rc))
{
return 0;
}
data = CMClone ( e->data, &tmp );
if (tmp.rc != CMPI_RC_OK)
{
CMSetStatus ( rc, CMPI_RC_ERR_FAILED );
return NULL;
}
return
(CMPIEnumeration *) __new_enumeration (
TOOL_MM_NO_ADD,
data,
rc );
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:28,代码来源:enumeration.c
示例3: memset
static NativeSubCond *__new_subcond(int mode, CMPIValuePtr ptr, CMPIStatus * rc)
{
static CMPISubCondFT eft = {
NATIVE_FT_VERSION,
__eft_release,
__eft_clone,
__eft_getCount,
__eft_getPredicateAt,
__eft_getPredicate
};
static CMPISubCond c = {
"CMPISubCond",
&eft
};
int state;
NativeSubCond cond,*tCond;
memset(&cond, 0, sizeof(cond));
cond.sc = c;
cond.cond=ptr;
tCond=memAddEncObj(mode, &cond, sizeof(cond),&state);
tCond->mem_state=state;
if (rc) CMSetStatus(rc, CMPI_RC_OK);
return tCond;
}
开发者ID:zaneb,项目名称:sblim-sfcb,代码行数:30,代码来源:subcond.c
示例4: __eft_toArray
static CMPIArray * __eft_toArray ( CMPIEnumeration * enumeration,
CMPIStatus * rc )
{
struct native_enum * e = (struct native_enum *) enumeration;
CMSetStatus ( rc, CMPI_RC_OK );
return e->data;
}
开发者ID:juergh,项目名称:dash-sdk,代码行数:7,代码来源:enumeration.c
示例5: __new_empty_result
static NativeResult *
__new_empty_result(int mode, CMPIStatus *rc)
{
static CMPIResultFT rft = {
NATIVE_FT_VERSION,
__rft_release,
__rft_clone,
__rft_returnData,
__rft_returnInstance,
__rft_returnObjectPath,
__rft_returnDone
};
static CMPIResult r = {
"CMPIResult",
&rft
};
int state;
NativeResult result,
*tRslt;
memset(&result, 0, sizeof(NativeResult));
result.result = r;
tRslt = memAddEncObj(mode, &result, sizeof(result), &state);
tRslt->mem_state = state;
if (rc)
CMSetStatus(rc, CMPI_RC_OK);
return tRslt;
}
开发者ID:pravinmahajan,项目名称:sblim-sfcb,代码行数:31,代码来源:result.c
示例6: __new_exp
static struct native_selectexp * __new_exp (
int mm_add,
CMPIUint64 id,
CMPIStatus * rc )
{
static CMPISelectExpFT eft = {
NATIVE_FT_VERSION,
__eft_release,
__eft_clone,
__eft_evaluate,
__eft_getString,
__eft_getDOC,
__eft_getCOD,
__eft_evaluateUsingAccessor
};
static CMPISelectExp e = {
"CMPISelectExp",
&eft
};
struct native_selectexp * exp =
(struct native_selectexp *)
tool_mm_alloc ( mm_add, sizeof ( struct native_selectexp ) );
exp->exp = e;
exp->mem_state = mm_add;
exp->id = id;
CMSetStatus ( rc, CMPI_RC_OK );
return exp;
}
开发者ID:host1812,项目名称:scx_plugin_public,代码行数:32,代码来源:selectexp.c
示例7: __new_predicate
static NativePredicate *
__new_predicate(int mode, QLOperation * op, CMPIStatus *rc)
{
static CMPIPredicateFT eft = {
NATIVE_FT_VERSION,
__eft_release,
__eft_clone,
__eft_getData,
__eft_evaluate
};
static CMPIPredicate p = {
"CMPIPredicate",
&eft
};
int state;
NativePredicate pred,
*tPred;
memset(&pred, 0, sizeof(pred));
pred.pred = p;
pred.op = op;
tPred = memAddEncObj(mode, &pred, sizeof(pred), &state);
tPred->mem_state = state;
if (rc)
CMSetStatus(rc, CMPI_RC_OK);
return tPred;
}
开发者ID:mchasal,项目名称:SFCB,代码行数:31,代码来源:predicate.c
示例8: __new_enumeration
static struct native_enum * __new_enumeration ( CMPIArray * array,
CMPIStatus * rc )
{
static CMPIEnumerationFT eft = {
NATIVE_FT_VERSION,
__eft_release,
__eft_clone,
__eft_getNext,
__eft_hasNext,
__eft_toArray
};
static const CMPIEnumeration e = {
"CMPIEnumeration",
&eft
};
struct native_enum * enumeration = (struct native_enum *)
calloc ( 1, sizeof ( struct native_enum ) );
enumeration->enumeration = e;
enumeration->data = array; /* CMClone ( array, rc ) ? */
CMSetStatus ( rc, CMPI_RC_OK );
return enumeration;
}
开发者ID:juergh,项目名称:dash-sdk,代码行数:25,代码来源:enumeration.c
示例9: __new_exp
static NativeSelectExp *
__new_exp(int mode, const char *queryString,
const char *language, const char *sns, CMPIArray **projection,
CMPIStatus *rc)
{
int state,
irc;
NativeSelectExp exp,
*tExp;
memset(&exp, 0, sizeof(exp));
exp.exp = eFt;
/*
* fprintf(stderr,"*** new select expression: %s %s\n",queryString,
* language);
*/
exp.qs =
parseQuery(mode, (char *) queryString, (char *) language,
(char *) sns, &irc);
if (irc) {
if (rc)
CMSetStatus(rc, CMPI_RC_ERR_INVALID_QUERY);
return NULL;
}
exp.queryString = strdup(queryString);
exp.language = strdup(language);
if (sns)
exp.sns = strdup(sns);
if (projection) {
char **list = exp.qs->spNames;
int i;
CMPIArray *ar =
*projection = TrackedCMPIArray(exp.qs->spNext, CMPI_string, NULL);
for (i = 0; *list; list++, i++)
CMSetArrayElementAt(ar, i, (CMPIValue *) * list, CMPI_chars);
}
tExp = memAddEncObj(mode, &exp, sizeof(exp), &state);
tExp->mem_state = state;
if (rc)
CMSetStatus(rc, CMPI_RC_OK);
return tExp;
}
开发者ID:pravinmahajan,项目名称:sblim-sfcb,代码行数:47,代码来源:selectexp.c
示例10: dtGetBinaryFormat
static CMPIUint64 dtGetBinaryFormat(const CMPIDateTime* eDt, CMPIStatus* rc) {
CIMDateTime* dt=(CIMDateTime*)eDt->hdl;
if (!dt) {
if (rc) CMSetStatus(rc, CMPI_RC_ERR_INVALID_PARAMETER);
return 0;
}
CMPIUint64 days,hours,mins,secs,usecs,utc,lTime;
struct tm tm,tmt;
CString tStr=dt->toString().getCString();
char cStr[26];
memset( cStr, 0, 26);
memcpy (cStr, (const char*)tStr, 25);
if (dt->isInterval()) {
cStr[21]=0;
usecs=atoi(cStr+15);
cStr[15]=0;
secs=atoi(cStr+12);
cStr[12]=0;
mins=atoi(cStr+10);
cStr[10]=0;
hours=atoi(cStr+8);
cStr[8]=0;
days=atoi(cStr);
lTime=(days*PEGASUS_UINT64_LITERAL(86400000000))+
(hours*PEGASUS_UINT64_LITERAL(3600000000))+
(mins*60000000)+(secs*1000000)+usecs;
}
else {
time_t tt=time(NULL);
#ifdef PEGASUS_PLATFORM_WIN32_IX86_MSVC
tmt=*localtime(&tt);
#else
localtime_r(&tt,&tmt);
#endif
memset(&tm,0,sizeof(tm));
tm.tm_isdst=tmt.tm_isdst;
utc=atoi(cStr+21);
cStr[21]=0;
usecs=atoi(cStr+15);
cStr[15]=0;
tm.tm_sec=atoi(cStr+12);
cStr[12]=0;
tm.tm_min=atoi(cStr+10);
cStr[10]=0;
tm.tm_hour=atoi(cStr+8);
cStr[8]=0;
tm.tm_mday=atoi(cStr+6);
cStr[6]=0;
tm.tm_mon=(atoi(cStr+4)-1);
cStr[4]=0;
tm.tm_year=(atoi(cStr)-1900);
lTime=mktime(&tm);
lTime*=1000000;
lTime+=usecs;
}
return lTime;
}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:59,代码来源:CMPI_DateTime.cpp
示例11: __eft_evaluate
static CMPIBoolean
__eft_evaluate(const CMPIPredicate *pred,
CMPIAccessor * acc, void *v, CMPIStatus *rc)
{
if (rc)
CMSetStatus(rc, CMPI_RC_ERR_NOT_SUPPORTED);
return 0;
}
开发者ID:mchasal,项目名称:SFCB,代码行数:8,代码来源:predicate.c
示例12: KFindProperty
CMPIData KFindProperty(
const CMPIInstance* ci,
const char* name,
CMPIStatus* status)
{
CMPICount count;
CMPICount i;
CMPIData cd;
count = CMGetPropertyCount(ci, NULL);
for (i = 0; i < count; i++)
{
CMPIString* pn = NULL;
CMPIStatus st;
cd = CMGetPropertyAt(ci, i, &pn, &st);
if (!KOkay(st) || !pn)
{
memset(&cd, 0, sizeof(cd));
if (status)
CMSetStatus(status, CMPI_RC_ERR_FAILED);
return cd;
}
if (strcasecmp(KChars(pn), name) == 0)
{
if (status)
CMSetStatus(status, CMPI_RC_OK);
return cd;
}
}
/* Not found! */
memset(&cd, 0, sizeof(cd));
if (status)
CMSetStatus(status, CMPI_RC_ERR_NOT_FOUND);
return cd;
}
开发者ID:jubalh,项目名称:konkretcmpi,代码行数:46,代码来源:general.c
示例13: getQualifierCount
static CMPICount
getQualifierCount(CMPIConstClass * cc, CMPIStatus *rc)
{
ClClass *cls = (ClClass *) cc->hdl;
if (rc)
CMSetStatus(rc, CMPI_RC_OK);
return (CMPICount) ClClassGetQualifierCount(cls);
}
开发者ID:mchasal,项目名称:SFCB,代码行数:8,代码来源:constClass.c
示例14: mbInvokeMethod
static CMPIData mbInvokeMethod(const CMPIBroker *mb, const CMPIContext *ctx,
const CMPIObjectPath *cop, const char *method, const CMPIArgs *in, CMPIArgs *out,
CMPIStatus *rc) {
CMPIData data={0,CMPI_nullValue,{0}};
mb=CM_BROKER;
if (rc) CMSetStatus(rc,CMPI_RC_ERR_NOT_SUPPORTED);
return data;
}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:8,代码来源:CMPI_Broker.cpp
示例15: __aft_getArgCount
static unsigned int
__aft_getArgCount(const CMPIArgs * args, CMPIStatus *rc)
{
ClArgs *ca = (ClArgs *) args->hdl;
if (rc)
CMSetStatus(rc, CMPI_RC_OK);
return (CMPICount) ClArgsGetArgCount(ca);
}
开发者ID:mchasal,项目名称:SFCB,代码行数:8,代码来源:args.c
示例16: sbcGetPredicateAt
CMPIPredicate* sbcGetPredicateAt(const CMPISubCond* eSbc,
unsigned int index, CMPIStatus* rc)
{
PEG_METHOD_ENTER(
TRC_CMPIPROVIDERINTERFACE,
"CMPI_SubCond:sbcGetPredicateAt()");
const CMPI_SubCond *sbc = (CMPI_SubCond*)eSbc->hdl;
if( !sbc )
{
PEG_TRACE_CSTRING(
TRC_CMPIPROVIDERINTERFACE,
Tracer::LEVEL1,
"Invalid handle in CMPI_SubCond:sbcGetPredicateAt");
CMSetStatus(rc, CMPI_RC_ERR_INVALID_HANDLE);
PEG_METHOD_EXIT();
return 0;
}
CMPI_TableauRow* row = (CMPI_TableauRow* )sbc->priv;
if( row )
{
if( index<=row->size() )
{
const CMPI_term_el *term=(row->getData())+index;
CMPIPredicate *prd=(CMPIPredicate*)new CMPI_Predicate(term);
/**
CMPI_Object puts in the hdl the pointer to the
CMPI_Predicate The sbcRelease will use that pointer to
de-allocate the CMPI_Predicate
structure.
*/
CMPI_Object *obj = new CMPI_Object(prd);
CMSetStatus(rc,CMPI_RC_OK);
CMPIPredicate* cmpiPredicate =
reinterpret_cast<CMPIPredicate*>(obj);
PEG_METHOD_EXIT();
return cmpiPredicate;
}
}
CMSetStatus(rc, CMPI_RC_ERR_NO_SUCH_PROPERTY);
PEG_METHOD_EXIT();
return NULL;
}
开发者ID:host1812,项目名称:scx_plugin_public,代码行数:45,代码来源:CMPI_SubCond.cpp
示例17: errGetErrorType
static CMPIErrorType errGetErrorType(const CMPIError* eErr, CMPIStatus* rc)
{
PEG_METHOD_ENTER(
TRC_CMPIPROVIDERINTERFACE,
"CMPI_Error:errGetErrorType()");
CIMError* cer=(CIMError*)eErr->hdl;
if (!cer)
{
PEG_TRACE_CSTRING(
TRC_CMPIPROVIDERINTERFACE,
Tracer::LEVEL1,
"Received invalid Handle - cer...");
CMSetStatus(rc, CMPI_RC_ERR_INVALID_PARAMETER);
PEG_METHOD_EXIT();
return UnknownErrorType;
}
CMPIBoolean notNull;
CIMError::ErrorTypeEnum pgErrorType;
try
{
notNull = cer->getErrorType(pgErrorType);
if (!notNull)
{
PEG_TRACE_CSTRING(
TRC_CMPIPROVIDERINTERFACE,
Tracer::LEVEL1,
"Received invalid Parameter...");
CMSetStatus(rc, CMPI_RC_ERR_INVALID_PARAMETER);
PEG_METHOD_EXIT();
return UnknownErrorType;
}
}
catch (...)
{
CMSetStatus(rc, CMPI_RC_ERR_FAILED);
PEG_METHOD_EXIT();
return UnknownErrorType;
}
CMSetStatus(rc,CMPI_RC_OK);
PEG_METHOD_EXIT();
return(CMPIErrorType)pgErrorType;
}
开发者ID:host1812,项目名称:scx_plugin_public,代码行数:45,代码来源:CMPI_Error.cpp
示例18: __cft_clone
static CMPIContext * __cft_clone ( CONST CMPIContext * ctx, CMPIStatus * rc )
{
if (!checkArgs(ctx, rc))
{
return 0;
}
CMSetStatus ( rc, CMPI_RC_ERR_NOT_SUPPORTED );
return NULL;
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:9,代码来源:context.c
示例19: __dtft_getStringFormat
static CMPIString *
__dtft_getStringFormat(const CMPIDateTime *dt, CMPIStatus *rc)
{
struct native_datetime *ndt = (struct native_datetime *) dt;
if (rc)
CMSetStatus(rc, CMPI_RC_OK);
return sfcb_native_new_CMPIString(ndt->cimDt, rc, 0);
}
开发者ID:buccella,项目名称:SFCB,代码行数:9,代码来源:datetime.c
示例20: dateTime2chars
void
dateTime2chars(CMPIDateTime *dt, CMPIStatus *rc, char *str_time)
{
struct native_datetime *ndt = (struct native_datetime *) dt;
strcpy(str_time, ndt->cimDt);
if (rc)
CMSetStatus(rc, CMPI_RC_OK);
}
开发者ID:buccella,项目名称:SFCB,代码行数:9,代码来源:datetime.c
注:本文中的CMSetStatus函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论