您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ soap_malloc函数代码示例

51自学网 2021-06-03 08:05:12
  C++
这篇教程C++ soap_malloc函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中soap_malloc函数的典型用法代码示例。如果您正苦于以下问题:C++ soap_malloc函数的具体用法?C++ soap_malloc怎么用?C++ soap_malloc使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了soap_malloc函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: setAuthorization

static void setAuthorization(soap *soap, const string &access_token){    soap->header = (SOAP_ENV__Header *)soap_malloc(soap, sizeof(SOAP_ENV__Header));    //soap->header->oxns__Authorization = (char*)soap_malloc(soap, (access_token.length() + 1)    //        * sizeof(char));    //strcpy(soap->header->oxns__Authorization, access_token.c_str());    soap->header->oxns__Authorization = (char *)access_token.c_str();}
开发者ID:aalto-cbir,项目名称:PicSOM,代码行数:8,


示例2: soap_fault

SOAP_FMAC3 void SOAP_FMAC4 soap_fault(struct soap *soap){	if (!soap->fault)	{	soap->fault = (struct SOAP_ENV__Fault*)soap_malloc(soap, sizeof(struct SOAP_ENV__Fault));		if (!soap->fault)			return;		soap_default_SOAP_ENV__Fault(soap, soap->fault);	}	if (soap->version == 2 && !soap->fault->SOAP_ENV__Code)	{	soap->fault->SOAP_ENV__Code = (struct SOAP_ENV__Code*)soap_malloc(soap, sizeof(struct SOAP_ENV__Code));		soap_default_SOAP_ENV__Code(soap, soap->fault->SOAP_ENV__Code);	}	if (soap->version == 2 && !soap->fault->SOAP_ENV__Reason)	{	soap->fault->SOAP_ENV__Reason = (struct SOAP_ENV__Reason*)soap_malloc(soap, sizeof(struct SOAP_ENV__Reason));		soap_default_SOAP_ENV__Reason(soap, soap->fault->SOAP_ENV__Reason);	}}
开发者ID:biancini,项目名称:Shibboleth-Authentication,代码行数:17,


示例3: DBG

static void *dime_write_open(struct soap *soap, const char *id, const char *type, const char *options){	DBG("/n");	// we can return NULL without setting soap->error if we don't want to use the streaming callback for this DIME attachment	struct dime_write_handle *handle = (struct dime_write_handle*)soap_malloc(soap, sizeof(struct dime_write_handle));	if (!handle)	{		soap->error = SOAP_EOM;		return NULL;	}#if 0	char *name = tempnam(TMPDIR, "data");	fprintf(stderr, "Saving file %s/n", name);	handle->name = soap_strdup(soap, name);	free(name);#else	time_t t = time(NULL);	struct tm tm = *localtime(&t);	char name[64];	memset(name, '/0', sizeof(name));	switch(bkev){	case EVENT_SET_FILENAME_CONFIG:		sprintf(name, "configuration-%d-%d-%d-%d-%d-%d.conf",				tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,				tm.tm_hour,	tm.tm_min, tm.tm_sec);		break;	case EVENT_SET_FILENAME_FIRMWARE:		sprintf(name, "firmware-%d-%d-%d-%d-%d-%d.ctfw",				tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,				tm.tm_hour,	tm.tm_min, tm.tm_sec);		break;	default:		sprintf(name, "%d-%d-%d-%d-%d-%d",				tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,				tm.tm_hour,	tm.tm_min, tm.tm_sec);		break;	}	DBG("tmpname: %s/n", name);	handle->name = soap_strdup(soap, name);#endif	handle->fd = fopen(handle->name, "wb");	if (!handle->fd)	{		soap->error = SOAP_EOF; // could not open file for writing		soap->errnum = errno; // get reason		return NULL;	}	return (void*)handle;}
开发者ID:eslinux,项目名称:Windows,代码行数:57,


示例4: ns__pow

int ns__pow(struct soap *soap, double a, double b, double *result){ *result = pow(a, b);  if (soap_errno == EDOM)	/* soap_errno is like errno, but compatible with Win32 */  { char *s = (char*)soap_malloc(soap, 1024);    sprintf(s, "Can't take the power of %f to %f", a, b);    return soap_receiver_fault(soap, "Power function domain error", s);  }  return SOAP_OK;} 
开发者ID:xin3liang,项目名称:platform_external_gsoap,代码行数:9,


示例5: rm_getJobStatus

/** * Gets the status of the job.  * * It maps the different states of PBS jobs to * pending and running. It does not make a difference between finished,  * cancelled, terminated and unknown jobs since PBS does not store this info. * @param jobid is the PID assigned by the queue * @return 0 if correct, non-zero if error */int rm_getJobStatus(struct soap* s, char* jobid, char* user, struct bes__ActivityStatusType** jobStatus){   struct bes__ActivityStatusType *activityStatus;   int connectionIdentifier;   //! stores the status of a job   struct batch_status* status;   if (!jobid || !jobStatus) {      return BESE_BAD_ARG;   }   connectionIdentifier = pbs_connect(server);   if (!connectionIdentifier)	   return BESE_BACKEND;   status = pbs_statjob(connectionIdentifier,jobid,NULL,NULL);   pbs_disconnect(connectionIdentifier);   if(status == NULL)   {      return BESE_NO_ACTIVITY;   }   activityStatus = (struct bes__ActivityStatusType*)soap_malloc(s, sizeof(struct bes__ActivityStatusType));   if (activityStatus == NULL) {      return BESE_MEM_ALLOC;   }   memset(activityStatus, 0, sizeof(struct bes__ActivityStatusType));   struct attrl* attrList = status->attribs;   while (attrList != NULL)   {      if(!strcmp(attrList->name, ATTR_state))      {        if(!strcmp(attrList->value, "T")) {           activityStatus->state = Pending;        }        else if(!strcmp(attrList->value, "Q")) {           activityStatus->state = Pending;        }                 else if(!strcmp(attrList->value,"H")) {           activityStatus->state = Pending;	}                 else if(!strcmp(attrList->value,"W")){           activityStatus->state = Pending;        }                 else if(!strcmp(attrList->value,"R")){           activityStatus->state = Running;        }        else if(!strcmp(attrList->value,"E")) {           activityStatus->state = Finished;        }        pbs_statfree(status);	*jobStatus = activityStatus;        return BESE_OK;     }     attrList = attrList->next;  }  pbs_statfree(status);  return BESE_NO_ACTIVITY;}
开发者ID:saga-project,项目名称:saga-cpp-adaptor-bes,代码行数:65,


示例6: soap_calloc

 soap_type_t * soap_calloc(struct soap *soap) {     if(NULL == soap)         throw std::invalid_argument("soap_calloc: soap is a null pointer");     soap_type_t *ptr;     if(NULL == (ptr = static_cast<soap_type_t*>(soap_malloc(soap, sizeof(soap_type_t)))))         throw soap_bad_alloc("soap_calloc(soap)");     memset(ptr, 0, sizeof(soap_type_t));     return ptr; }
开发者ID:italiangrid,项目名称:storm-client,代码行数:10,


示例7: ns2__div

int ns2__div(struct soap *soap, double a, double b, double *result){ if (b)    *result = a / b;  else  { char *s = (char*)soap_malloc(soap, 1024);    sprintf(s, "<error xmlns=/"http://tempuri.org//">Can't divide %f by %f</error>", a, b);    return soap_sender_fault(soap, "Division by zero", s);  }  return SOAP_OK;} 
开发者ID:yuvalif,项目名称:calc2,代码行数:10,


示例8: ns2__pow

int ns2__pow(struct soap *soap, double a, double b, double *result){ *result = pow(a, b);  if (soap_errno == EDOM)	/* soap_errno is like errno, but compatible with Win32 */  { char *s = (char*)soap_malloc(soap, 1024);    sprintf(s, "Can't take the power of %f to %f", a, b);    sprintf(s, "<error xmlns=/"http://tempuri.org//">Can't take power of %f to %f</error>", a, b);    return soap_sender_fault(soap, "Power function domain error", s);  }  return SOAP_OK;} 
开发者ID:yuvalif,项目名称:calc2,代码行数:10,


示例9: getdata

static int getdata(struct soap *soap, const char *name, ns__Data& data){	struct stat sb;	FILE *fd = NULL;	if (name && !strchr(name, '/') && !strchr(name, '//') && !strchr(name, ':'))	{ char *s = (char*)soap_malloc(soap, strlen(TMPDIR) + strlen(name) + 2);		strcpy(s, TMPDIR);		strcat(s, "/");		strcat(s, name);		fd = fopen(s, "rb");		if (!fd)		{ strcpy(s, name);			fd = fopen(s, "rb");		}	}	if (!fd)		return SOAP_EOF;	if ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK) // chunked response is possible	{ data.__ptr = (unsigned char*)fd; // must set to non-NULL (this is our fd handle which we need in the callbacks)		data.__size = 0; // zero size streams data with HTTP chunking	}	else if (!fstat(fileno(fd), &sb) && sb.st_size > 0)	{ // since we can get the length of the file, we can stream it		data.__ptr = (unsigned char*)fd; // must set to non-NULL (this is our fd handle which we need in the callbacks)		data.__size = sb.st_size;	}	else // we can't use HTTP chunking and we don't know the size, so buffer it	{ int i;		data.__ptr = (unsigned char*)soap_malloc(soap, MAX_FILE_SIZE);		for (i = 0; i < MAX_FILE_SIZE; i++)		{ int c;			if ((c = fgetc(fd)) == EOF)				break;			data.__ptr[i] = c;		}		fclose(fd);		data.__size = i;	}	data.type = (char*)""; // specify non-NULL id or type to enable DIME	data.options = soap_dime_option(soap, 0, name);	return SOAP_OK;}
开发者ID:eslinux,项目名称:Windows,代码行数:43,


示例10: new_reqList

static struct ns2__requestParameterList* new_reqList(struct soap* soap, char* reqOp, char* paramName, char* comparOp, char* paramValue) {  struct ns2__requestParameterList* reqList = (struct ns2__requestParameterList*) soap_malloc(soap, sizeof(struct ns2__requestParameterList));  struct ns2__parameterListItem* listItem = (struct ns2__parameterListItem*) soap_malloc(soap, sizeof(struct ns2__parameterListItem));  soap_default_ns2__requestParameterList(soap, reqList);  soap_default_ns2__parameterListItem(soap, listItem);  reqList->requestAPI = "REQUEST1";  reqList->requestOperation = reqOp;  reqList->parameters = listItem;  reqList->__sizeparameters = 1;  listItem->comparisonOp = comparOp;  listItem->parameterValue = soap_malloc(soap, sizeof(char*));  listItem->parameterValue[0] = paramValue;  listItem->__sizeparameterValue = 1;  listItem->parameterName = paramName;  return reqList;}
开发者ID:abidinz,项目名称:Stormee,代码行数:19,


示例11: ns__div

int ns__div(struct soap *soap, double a, double b, double *result){ if (b)    *result = a / b;  else  { char *s = (char*)soap_malloc(soap, 1024);    sprintf(s, "Can't divide %f by %f", a, b);    return soap_receiver_fault(soap, "Division by zero", s);  }  return SOAP_OK;} 
开发者ID:xin3liang,项目名称:platform_external_gsoap,代码行数:10,


示例12: m__EchoTestMultiple

int m__EchoTestMultiple(struct soap *soap, struct x__WrapperType *x__EchoTest, struct m__EchoTestMultipleResponse *response){ int i;  if (!x__EchoTest)    return soap_sender_fault(soap, "No data", NULL);  /* allocate response */  response->x__EchoTest = (struct x__WrapperType*)soap_malloc(soap, sizeof(struct x__WrapperType));  if (!response->x__EchoTest)    return SOAP_EOM;  response->x__EchoTest->__size = x__EchoTest->__size;  response->x__EchoTest->Data = (struct x__DataType*)soap_malloc(soap, sizeof(struct x__DataType) * x__EchoTest->__size);  if (!response->x__EchoTest->Data)    return SOAP_EOM;  /* copy data into response, switching from base64 to MTOM and vice versa */  for (i = 0; i < x__EchoTest->__size; ++i)  { switch (x__EchoTest->Data[i].__union)    { case SOAP_UNION_x__data_xop__Include:        /* convert MTOM attachment to base64Binary */        response->x__EchoTest->Data[i].__union = SOAP_UNION_x__data_base64;        response->x__EchoTest->Data[i].choice.base64.__ptr = x__EchoTest->Data[i].choice.xop__Include.__ptr;        response->x__EchoTest->Data[i].choice.base64.__size = x__EchoTest->Data[i].choice.xop__Include.__size;        response->x__EchoTest->Data[i].xmime5__contentType = x__EchoTest->Data[i].choice.xop__Include.type;        break;      case SOAP_UNION_x__data_base64:        /* convert base64Binary to MTOM attachment */        response->x__EchoTest->Data[i].__union = SOAP_UNION_x__data_xop__Include;        response->x__EchoTest->Data[i].choice.xop__Include.__ptr = x__EchoTest->Data[i].choice.base64.__ptr;        response->x__EchoTest->Data[i].choice.xop__Include.__size = x__EchoTest->Data[i].choice.base64.__size;        response->x__EchoTest->Data[i].choice.xop__Include.id = NULL;        response->x__EchoTest->Data[i].choice.xop__Include.type = x__EchoTest->Data[i].xmime5__contentType;        response->x__EchoTest->Data[i].choice.xop__Include.options = NULL;        response->x__EchoTest->Data[i].xmime5__contentType = x__EchoTest->Data[i].xmime5__contentType;#ifdef WITH_NOIDREF        /* compiling with WITH_NOIDREF removes auto-detection of attachments */        soap_set_mime(soap, NULL, NULL); /* so we explicitly set MIME attachments */#endif        break;      default:        return soap_sender_fault(soap, "Wrong data format", NULL);    }  }  return SOAP_OK;}
开发者ID:allenway,项目名称:onvif,代码行数:42,


示例13: sizeof

int CSetSoapSecurityDigest2Impl::soap_wsse_add_UsernameTokenText(struct soap *soap, 												  const char *username, const char *password)  {       _wsse__Security *security = soap->header->wsse__Security;      /* allocate a UsernameToken if we don't have one already */      if (!security->UsernameToken)          security->UsernameToken = (_wsse__UsernameToken*)soap_malloc(soap, sizeof(_wsse__UsernameToken));      soap_default__wsse__UsernameToken(soap, security->UsernameToken);      /* populate the UsernameToken */  /*    security->UsernameToken->wsu__Id = soap_strdup(soap, id);  */    security->UsernameToken->Username = soap_strdup(soap, username);      /* allocate and populate the Password */      if (password)      {           security->UsernameToken->Password = (_wsse__Password*)soap_malloc(soap, sizeof(_wsse__Password));          soap_default__wsse__Password(soap, security->UsernameToken->Password);          security->UsernameToken->Password->__item = soap_strdup(soap, password);      }      return SOAP_OK;  }  
开发者ID:cqzhanghy,项目名称:onvifclient,代码行数:20,


示例14: onvif_db

/// Web service operation 'Probe' (returns error code or SOAP_OK)int OnvifRemoteDiscoveryBindingService::Probe(struct wsdd__ProbeType tdn__Probe, struct wsdd__ProbeMatchesType &tdn__ProbeResponse) {	char *pEndpointAddress = NULL, *pTypes = NULL, *pItem = NULL, *pXAddrs = NULL, *pMatchBy = NULL, *pAction = NULL;	onvif_db(("Entered: %s:%u./n", __FUNCTION__, __LINE__));#if WSDISCOVERY_SPEC_VER == WSDISCOVERY_SPEC_200901   set_field_string(&pAction, "http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/ProbeMatches");   set_field_string(&pMatchBy, "http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/rfc3986");#else   set_field_string(&pAction, "http://schemas.xmlsoap.org/ws/2005/04/discovery/ProbeMatches");   set_field_string(&pMatchBy, "http://schemas.xmlsoap.org/ws/2005/04/discovery/rfc3986");#endif	pTypes           = nativeGetTypes();	pItem            = nativeGetScopesItem();	pXAddrs          = nativeGetXAddrs(ONVIF_ETH_INF);	pEndpointAddress = nativeGetEndpointAddress(ONVIF_ETH_INF);	tdn__ProbeResponse.__sizeProbeMatch = 1;	tdn__ProbeResponse.ProbeMatch = (struct wsdd__ProbeMatchType *) soap_malloc(this, sizeof(struct wsdd__ProbeMatchType));	soap_default_wsdd__ProbeMatchType(this, tdn__ProbeResponse.ProbeMatch);	soap_set_field_string(this, &tdn__ProbeResponse.ProbeMatch->wsa__EndpointReference.Address, pEndpointAddress);	soap_set_field_string(this, &tdn__ProbeResponse.ProbeMatch->Types, pTypes);	tdn__ProbeResponse.ProbeMatch->Scopes = (struct wsdd__ScopesType *)soap_malloc(this, sizeof(struct wsdd__ScopesType));	soap_default_wsdd__ScopesType(this, tdn__ProbeResponse.ProbeMatch->Scopes);	soap_set_field_string(this, &tdn__ProbeResponse.ProbeMatch->Scopes->__item, pItem);	soap_set_field_string(this, &tdn__ProbeResponse.ProbeMatch->Scopes->MatchBy, pMatchBy);	soap_set_field_string(this, &tdn__ProbeResponse.ProbeMatch->XAddrs, pXAddrs);	tdn__ProbeResponse.ProbeMatch->MetadataVersion = 1;	free(pAction);	free(pMatchBy);	free(pEndpointAddress);	free(pTypes);	free(pItem);	free(pXAddrs);	return SOAP_OK;}
开发者ID:haohd,项目名称:bananaPiCam,代码行数:42,


示例15: SetDeltaScreenCaptureAttachment

//**********************************************************************************// SetDeltaScreenCaptureAttachment//**********************************************************************************int SetDeltaScreenCaptureAttachment(struct soap* soap,							        BYTE* data,							        int dataSize,                                    BYTE command,							        char* mimeType,                                    struct ns1__captureDeltaScreenResponse &r){	// Set rectangle	r._returnDeltaAttachment.rect.topLeftX     = *(WORD*)data; data+=2;	r._returnDeltaAttachment.rect.topLeftY     = *(WORD*)data; data+=2;	r._returnDeltaAttachment.rect.bottomRightX = *(WORD*)data; data+=2;	r._returnDeltaAttachment.rect.bottomRightY = *(WORD*)data; data+=2;	dataSize -= 2*4;	// No attachment?	if ( dataSize == 0 )		return SOAP_OK;	// alloc soap memory for attachment	char* soapAttachment = (char*)soap_malloc(soap, dataSize );	memcpy( soapAttachment, data, dataSize );	// get & set href for attachment	char href[MAX_HREF_LEN];	GetHref(href, command);	r._returnDeltaAttachment.href = (char*)soap_malloc(soap, strlen(href)+1 );	strcpy( r._returnDeltaAttachment.href, href );	// default mimetype is bmp	if ( !( mimeType ? strlen( mimeType ) : 0 ) )        mimeType = "image/bmp";	// set mimetype	r._returnDeltaAttachment.mimeType = (char*)soap_malloc(soap, strlen(mimeType)+1 );	strcpy( r._returnDeltaAttachment.mimeType, mimeType );	// set the attahcment	soap_set_dime(soap);	return soap_set_dime_attachment(soap, soapAttachment, dataSize,	                                mimeType, href, 0, NULL);}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:44,


示例16: soap_faultsubcode

SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultsubcode(struct soap *soap){	soap_fault(soap);	if (soap->version == 2)	{	if (!soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode)		{	soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode = (struct SOAP_ENV__Code*)soap_malloc(soap, sizeof(struct SOAP_ENV__Code));			soap_default_SOAP_ENV__Code(soap, soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode);		}		return (const char**)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Value;	}	return (const char**)&soap->fault->faultcode;}
开发者ID:millken,项目名称:zhuxianB30,代码行数:12,


示例17: printf

int calcService::pow(double a, double b, double *result){	printf("pow ... /n");	*result = ::pow(a, b);	if (soap_errno == EDOM)	/* soap_errno is like errno, but compatible with Win32 */	{ char *s = (char*)soap_malloc(this, 1024);		(SOAP_SNPRINTF(s, 1024, 100), "<error xmlns=/"http://tempuri.org//">Can't take power of %f to %f</error>", a, b);		return soap_senderfault("Power function domain error", s);	}	return SOAP_OK;}
开发者ID:eslinux,项目名称:Windows,代码行数:12,


示例18: check_header

int check_header(struct soap *soap){ /* MUST have received a SOAP Header */  if (!soap->header)    return soap_sender_fault(soap, "No SOAP header", NULL);  /* ... with a Message ID */  if (!soap->header->wsa__MessageID)    return soap_sender_fault(soap, "No WS-Addressing MessageID", NULL);  soap->header->wsa__RelatesTo = (struct wsa__Relationship*)soap_malloc(soap, sizeof(struct wsa__Relationship));  soap_default_wsa__Relationship(soap, soap->header->wsa__RelatesTo);  soap->header->wsa__RelatesTo->__item = soap->header->wsa__MessageID;  return SOAP_OK;}
开发者ID:119-org,项目名称:TND,代码行数:12,


示例19: ns__bitwiseAnd

int ns__bitwiseAnd(  struct soap *soap, char *src1,				char *src2,				char **OutputMatFilename){    double start, end;    start = omp_get_wtime();	Mat matSrc1;    if(!readMat(src1, matSrc1))    {        cerr << "And :: src1 can not read bin file" << endl;        return soap_receiver_fault(soap, "And :: src1 can not read bin file", NULL);    }    Mat matSrc2;    if(!readMat(src2, matSrc2))    {        cerr << "And :: src2 can not read bin file" << endl;        return soap_receiver_fault(soap, "And :: src2 can not read bin file", NULL);    }    int cols = matSrc1.cols ;    int srcType1 = matSrc1.type();    int srcType2 = matSrc2.type();    if(srcType1 != srcType2 )    {        matSrc2.convertTo(matSrc2, srcType1);	}    Mat dst;    bitwise_and(matSrc1, matSrc2, dst);    /* generate output file name */    *OutputMatFilename = (char*)soap_malloc(soap, 60);    getOutputFilename(OutputMatFilename,"_bitwiseAnd");    /* save to bin */    if(!saveMat(*OutputMatFilename, dst))    {        cerr << "And:: save mat to binary file" << endl;        return soap_receiver_fault(soap, "And :: save mat to binary file", NULL);    }    matSrc1.release();    matSrc2.release();    dst.release();    end = omp_get_wtime();    cerr<<"ns__And time elapsed "<<end-start<<endl;    return SOAP_OK;}
开发者ID:FranoTech,项目名称:ws-workflow,代码行数:52,


示例20: getMessage

struct _ns1__messageResponseTypeDef* getMessage(struct soap* soap, struct ns2__requestParameterList* reqList) {  struct _ns1__messageResponseTypeDef* respList = NULL;  addSecurity(soap);  respList = (struct _ns1__messageResponseTypeDef*) soap_malloc(soap, sizeof(struct _ns1__messageResponseTypeDef));  if (soap_call___ns1__getMessage(soap, "https://tdl.integration.fema.gov/IPAWS_CAPService/IPAWS", NULL, reqList, respList)) {    //    soap_print_fault(soap, stderr);    return NULL;  }  return respList;}
开发者ID:abidinz,项目名称:Stormee,代码行数:13,


示例21: m__GetData

int m__GetData(struct soap *soap, struct x__Keys *keys, struct m__GetDataResponse *response){ int i;  if ((soap->omode & SOAP_IO) == SOAP_IO_STORE)    soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_BUFFER;  if (!keys)    return soap_sender_fault(soap, "No keys", NULL);  /* Set up array of attachments to return */  response->x__data.__size = keys->__size;  response->x__data.item = soap_malloc(soap, keys->__size*sizeof(struct x__Data));  for (i = 0; i < keys->__size; ++i)    open_data(soap, keys->key[i], &response->x__data.item[i]);  return SOAP_OK;}
开发者ID:BioinformaticsArchive,项目名称:KBWS,代码行数:13,


示例22: if

struct value& _array::operator[](int n){ if (!data.value)  { data.__size = n + 1;    data.value = (struct value*)soap_malloc(soap, data.__size * sizeof(struct value));    for (int i = 0; i < data.__size; i++)      soap_default_value(soap, &data.value[i]);  }  else if (data.__size <= n)  { int oldsize = data.__size;    data.__size = n + 1;    struct value *newvalue = (struct value*)soap_malloc(soap, data.__size * sizeof(struct value));    int i;    for (i = 0; i < oldsize; i++)      newvalue[i] = data.value[i];    for (; i < data.__size; i++)      soap_default_value(soap, &newvalue[i]);    soap_unlink(soap, data.value);    free(data.value);    data.value = newvalue;  }  return data.value[n];}
开发者ID:BioinformaticsArchive,项目名称:KBWS,代码行数:22,


示例23: soap_malloc_zero

void* soap_malloc_zero(struct soap *p_soap, size_t n){    register void *p = NULL;    p = soap_malloc(p_soap, n);    if (NULL == p)    {        return NULL;    }    memset(p, 0, n);    return p;}
开发者ID:JammyWei,项目名称:ver30,代码行数:13,


示例24: createBESFaultElement

static struct soap_dom_element*createBESFaultElement(struct soap *s,         const char *bescode, const char *faultstring,        struct soap_dom_element **besdetailpp){    struct soap_dom_element *fault, *faultcode, *faultstr;    struct soap_dom_element *detail, *besdetail;        if (!s || !bescode || !faultstring || !besdetailpp) {        return NULL;    }        fault = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element));    faultcode = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element));    faultstr = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element));    detail = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element));    besdetail = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element));    if (!fault || !faultcode || !faultstr || !detail || !besdetail) {        return NULL;    }    memset(fault, 0, sizeof(struct soap_dom_element));    memset(faultcode, 0, sizeof(struct soap_dom_element));    memset(faultstr, 0, sizeof(struct soap_dom_element));    memset(detail, 0, sizeof(struct soap_dom_element));    memset(besdetail, 0, sizeof(struct soap_dom_element));        faultcode->name = soap_strdup(s, "faultcode");    faultcode->data = (char*)soap_malloc(s, strlen("bes:") + strlen(bescode) + 1);    sprintf(faultcode->data, "bes:%s", bescode);    faultcode->prnt = fault;    faultcode->next = faultstr;    faultcode->soap = s;        faultstr->name = soap_strdup(s, "faultstring");    faultstr->data = soap_strdup(s, faultstring);    faultstr->prnt = fault;    faultstr->next = detail;    faultstr->soap = s;        detail->name = soap_strdup(s, "detail");    detail->elts = besdetail;    detail->prnt = fault;    detail->soap = s;    besdetail->name = soap_strdup(s, bescode);    besdetail->nstr = soap_strdup(s, BES_NS);    besdetail->prnt = detail;    besdetail->soap = s;        fault->nstr = soap_strdup(s, BES_NS);    fault->name = soap_strdup(s, "Fault");    fault->elts = faultcode;    fault->soap = s;        *besdetailpp = besdetail;        return fault;}
开发者ID:saga-project,项目名称:saga-cpp-adaptor-bes,代码行数:58,


示例25: UserGetUri

    void UserGetUri(struct soap *soap, struct _trt__GetProfilesResponse *trt__GetProfilesResponse,struct _tds__GetCapabilitiesResponse *capa_resp)      {  	struct _trt__GetStreamUri *trt__GetStreamUri = (struct _trt__GetStreamUri *)malloc(sizeof(struct _trt__GetStreamUri));	struct _trt__GetStreamUriResponse *trt__GetStreamUriResponse = (struct _trt__GetStreamUriResponse *)malloc(sizeof(struct _trt__GetStreamUriResponse));        int result=0 ;          trt__GetStreamUri->StreamSetup = (struct tt__StreamSetup*)soap_malloc(soap,sizeof(struct tt__StreamSetup));//初始化,分配空间          trt__GetStreamUri->StreamSetup->Stream = 0;//stream type                trt__GetStreamUri->StreamSetup->Transport = (struct tt__Transport *)soap_malloc(soap, sizeof(struct tt__Transport));//初始化,分配空间          trt__GetStreamUri->StreamSetup->Transport->Protocol = 0;          trt__GetStreamUri->StreamSetup->Transport->Tunnel = 0;          trt__GetStreamUri->StreamSetup->__size = 1;          trt__GetStreamUri->StreamSetup->__any = NULL;          trt__GetStreamUri->StreamSetup->__anyAttribute =NULL;                      trt__GetStreamUri->ProfileToken = trt__GetProfilesResponse->Profiles->token ;                printf("/n/n---------------Getting Uri----------------/n/n");                soap_wsse_add_UsernameTokenDigest(soap,"user", ONVIF_USER, ONVIF_PASSWORD);          soap_call___trt__GetStreamUri(soap, capa_resp->Capabilities->Media->XAddr, NULL, trt__GetStreamUri, trt__GetStreamUriResponse);                      if (soap->error) {          printf("soap error: %d, %s, %s/n", soap->error, *soap_faultcode(soap), *soap_faultstring(soap));          result = soap->error;                }          else{              printf("!!!!NOTE: RTSP Addr Get Done is :%s /n",trt__GetStreamUriResponse->MediaUri->Uri);  	    //最后我们使用vlc -vvv命令来打开一个rstp网络流	    char cmd_str[256];	    memset(cmd_str, 0, sizeof(cmd_str));	    sprintf(cmd_str, "vlc %s --sout=file/ps:device%d.mp4", trt__GetStreamUriResponse->MediaUri->Uri, HasDev);	    popen((const char *)cmd_str, "r");		        }      }  
开发者ID:jiangbing9293,项目名称:ONVIF,代码行数:38,


示例26: jp2s_error

static struct jptype__genericFault* jp2s_error(struct soap *soap, const glite_jp_error_t *err){	struct jptype__genericFault *ret = NULL;	if (err) {		ret = soap_malloc(soap,sizeof *ret);		memset(ret,0,sizeof *ret);		ret->code = err->code;		ret->source = soap_strdup(soap,err->source);		ret->text = soap_strdup(soap,strerror(err->code));		ret->description = err->desc ? soap_strdup(soap,err->desc) : NULL;		ret->reason = jp2s_error(soap,err->reason);	}	return ret;}
开发者ID:CESNET,项目名称:glite-jp,代码行数:14,



注:本文中的soap_malloc函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ soap_new函数代码示例
C++ soap_lookup_plugin函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。