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

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

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

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

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

示例1: cmd_pfs_getid

intcmd_pfs_getid(const char *sel_path, const char *name, int privateid){	hammer2_ioc_pfs_t pfs;	int ecode = 0;	int fd;	uint32_t status;	char *pfs_id_str = NULL;	if ((fd = hammer2_ioctl_handle(sel_path)) < 0)		return(1);	bzero(&pfs, sizeof(pfs));	snprintf(pfs.name, sizeof(pfs.name), "%s", name);	if (ioctl(fd, HAMMER2IOC_PFS_LOOKUP, &pfs) < 0) {		perror("ioctl");		ecode = 1;	} else {		if (privateid)			uuid_to_string(&pfs.pfs_fsid, &pfs_id_str, &status);		else			uuid_to_string(&pfs.pfs_clid, &pfs_id_str, &status);		printf("%s/n", pfs_id_str);		free(pfs_id_str);		pfs_id_str = NULL;	}	close(fd);	return (ecode);}
开发者ID:victoredwardocallaghan,项目名称:DragonFlyBSD,代码行数:29,


示例2: _

mach_port_tAuthHostInstance::lookup(SessionId jobId){    StLock<Mutex> _(*this);        mach_port_t pluginhostPort = MACH_PORT_NULL;    kern_return_t result;    const char *serviceName;    /* PR-7483709 const */ uuid_t instanceId = UUID_INITIALIZER_FROM_SESSIONID(jobId);    uuid_string_t s;    if ((mHostType == securityAgent)) {	if (!(session().attributes() & sessionHasGraphicAccess))	    CssmError::throwMe(CSSM_ERRCODE_NO_USER_INTERACTION);	if (inDarkWake())	    CssmError::throwMe(CSSM_ERRCODE_IN_DARK_WAKE);    }        if (mHostType == securityAgent)	serviceName = SECURITYAGENT_BOOTSTRAP_NAME_BASE;    else	serviceName = AUTHORIZATIONHOST_BOOTSTRAP_NAME_BASE;    secdebug("AuthHostInstance", "looking up %s instance %s", serviceName,      uuid_to_string(instanceId, s)); // XXX/gh  debugging    if ((result = bootstrap_look_up3(bootstrap_port, serviceName,      &pluginhostPort, 0, instanceId, BOOTSTRAP_SPECIFIC_INSTANCE)) != KERN_SUCCESS) {        Syslog::error("error %d looking up %s instance %s", result, serviceName,	  uuid_to_string(instanceId, s));    } else	secdebug("AuthHostInstance", "port = %x", (unsigned int)pluginhostPort);    return pluginhostPort;}
开发者ID:unofficial-opensource-apple,项目名称:Security,代码行数:35,


示例3: rmnode

int rmnode (lua_State *L) {  TreeNode *node = checktree(L, 1);  TreeNode *parent = node->parent;  int i;  char uuid_str[40];  uuid_to_string(&node->uuid, uuid_str);  printd("Removing node with uuid %s/n", uuid_str);  if (parent != NULL) {    uuid_to_string(&parent->uuid, uuid_str);    printd("Node has parent with uuid %s. Remove reference from parent's children list./n", uuid_str);    for (i = 0; i < parent->children_count; ++i) {      if (parent->children != NULL && parent->children[i] != NULL &&          0 == custom_uuid_compare(node->uuid, parent->children[i]->uuid))      {        parent->children[i] = NULL;        /* free (unref) userdata in parent node */        luaL_unref(L, LUA_REGISTRYINDEX, parent->udreflist[i]);        parent->udreflist[i] = LUA_REFNIL;      }    }  }  // free node strucrure  /* free (unref) userdata in current node */  for (i = 0; i < node->children_count; ++i) {    if (node->udreflist != NULL && node->udreflist[i] != LUA_REFNIL) {      luaL_unref(L, LUA_REGISTRYINDEX, node->udreflist[i]);      node->udreflist[i] = LUA_REFNIL;      node->children[i]->parent = NULL;    }  }  if (node->dataType == LUA_TSTRING)    free(node->data.charVal);  if (node->name)    free(node->name);  if (node->children)    free(node->children);  if (node->udreflist)    free(node->udreflist);  node->udreflist = NULL;  node->children = NULL;  node->parent = NULL;  node->name = NULL;  return 0;}
开发者ID:wayfarer-rus,项目名称:engine,代码行数:53,


示例4: _soap_addressing_generate_id

static char *_soap_addressing_generate_id(void){  uuid_t uuid;  uint32_t status;  char *ret, *buf;  uuid_create(&uuid, &status);  if (status != uuid_s_ok)  {    log_error("uuidcreate failed (%s)", _soap_addressing_uuid_error(status));    return NULL;  }  uuid_to_string(&uuid, &buf, &status);  if (status != uuid_s_ok)  {    log_error("uuid_to_string failed (%s)", _soap_addressing_uuid_error(status));    return NULL;  }  if (!(ret = (char *)malloc(128)))  {    log_error("malloc failed (%s)", strerror(errno));    free(buf);    return NULL;  }  sprintf(ret, "%s/%s", soap_server_get_name(), buf);  free(buf);  return ret;}
开发者ID:ayang64,项目名称:csoap,代码行数:34,


示例5: read_handler

static void read_handler(BLECharacteristic characteristic,                         const uint8_t *value,                         size_t value_length,                         uint16_t value_offset,                         BLEGATTError error) {  char uuid_buffer[UUID_STRING_BUFFER_LENGTH];  Uuid characteristic_uuid = ble_characteristic_get_uuid(characteristic);  uuid_to_string(&characteristic_uuid, uuid_buffer);  APP_LOG(APP_LOG_LEVEL_INFO, "Read Characteristic %s, %u bytes, error: %u", uuid_buffer, value_length, error);  for (size_t i = 0; i < value_length; ++i) {    APP_LOG(APP_LOG_LEVEL_INFO, "0x%02x", value[i]);  }  	const Uuid node_service_4_uuid =				UuidMake(0x18, 0xcd, 0xa7, 0x84, 0x4b, 0xd3, 0x43, 0x70,								 0x85, 0xbb, 0xbf, 0xed, 0x91, 0xec, 0x86, 0xaf);  // node sensor data incoming  if (uuid_equal(&characteristic_uuid, &node_service_4_uuid)) {  	APP_LOG(APP_LOG_LEVEL_INFO, "Incoming sensor data...");  	if(value_length + node_ctx.read_node_buffer_pos > node_ctx.read_node_buffer_max) {  		process_read_buffer();  		node_ctx.read_node_buffer_pos = 0;  	}  	char *buff = (char *)&node_ctx.read_node_buffer;  		memcpy(buff+node_ctx.read_node_buffer_pos, value, value_length);  	  	node_ctx.read_node_buffer_pos += value_length;  }  }
开发者ID:gitizenme,项目名称:environator,代码行数:31,


示例6: ficlUuidToString

voidficlUuidToString(FICL_VM *pVM){#ifndef	TESTMAIN	char	*uuid;	uint32_t status;#endif	uuid_t	*u;#if FICL_ROBUST > 1	vmCheckStack(pVM, 1, 0);#endif	u = (uuid_t *)stackPopPtr(pVM->pStack);#ifndef	TESTMAIN	uuid_to_string(u, &uuid, &status);	if (status != uuid_s_ok) {		stackPushPtr(pVM->pStack, uuid);		stackPushINT(pVM->pStack, strlen(uuid));	} else#endif		stackPushINT(pVM->pStack, -1);	return;}
开发者ID:jaredmcneill,项目名称:freebsd,代码行数:26,


示例7: draw_data_row

static void draw_data_row(GContext* ctx, const Layer *cell_layer,                          MenuIndex *cell_index, void *data) {  ScanResult *result = list_get_by_index(cell_index->row);  // Build the title string:  char title[32];  // Annotate with "NODE" if the device has a heart rate service:  char *node_str = result->has_node_service ? "NODE" : "";  // If there is a local name, show it, otherwise use the device address:  if (strlen(result->local_name)) {    snprintf(title, sizeof(title), "%s %s", result->local_name, node_str);  } else {    const BTDeviceAddress address = bt_device_get_address(result->device);    snprintf(title, sizeof(title), BT_DEVICE_ADDRESS_FMT " %s",             BT_DEVICE_ADDRESS_XPLODE(address), node_str);  }  // Build the subtitle string:  char subtitle[UUID_STRING_BUFFER_LENGTH];  if (result->has_services) {    // Make a displayable string of the first Service UUID:    uuid_to_string(&result->first_service_uuid, subtitle);  } else {    // If advertisement did not contain Service UUIDs:    strncpy(subtitle, "No Service UUIDs", sizeof(subtitle));  }  menu_cell_basic_draw(ctx, cell_layer, title, subtitle, NULL);}
开发者ID:gitizenme,项目名称:environator,代码行数:29,


示例8: descriptor_write_handler

static void descriptor_write_handler(BLEDescriptor descriptor,                                     BLEGATTError error) {  char uuid_buffer[UUID_STRING_BUFFER_LENGTH];  Uuid descriptor_uuid = ble_descriptor_get_uuid(descriptor);  uuid_to_string(&descriptor_uuid, uuid_buffer);  APP_LOG(APP_LOG_LEVEL_INFO, "Write response for Descriptor %s (error=%u)", uuid_buffer, error);}
开发者ID:gitizenme,项目名称:environator,代码行数:8,


示例9: uuid_create

zmq::uuid_t::uuid_t (){    uint32_t status;    uuid_create (&uuid, &status);    zmq_assert (status == uuid_s_ok);    uuid_to_string (&uuid, &uuid_str, &status);    zmq_assert (status == uuid_s_ok);}
开发者ID:thelonesquirrely,项目名称:zeromq2,代码行数:8,


示例10: write_handler

static void write_handler(BLECharacteristic characteristic,                          BLEGATTError error) {  char uuid_buffer[UUID_STRING_BUFFER_LENGTH];  Uuid characteristic_uuid = ble_characteristic_get_uuid(characteristic);  uuid_to_string(&characteristic_uuid, uuid_buffer);  APP_LOG(APP_LOG_LEVEL_INFO, "Write response for Characteristic %s (error=%u)", uuid_buffer, error);}
开发者ID:gitizenme,项目名称:environator,代码行数:8,


示例11: efi_print_var

static intefi_print_var(CHAR16 *varnamearg, EFI_GUID *matchguid, int lflag){	UINTN		datasz, i;	EFI_STATUS	status;	UINT32		attr;	CHAR16		*data;	char		*str;	uint32_t	uuid_status;	int		is_ascii;	datasz = 0;	status = RS->GetVariable(varnamearg, matchguid, &attr,	    &datasz, NULL);	if (status != EFI_BUFFER_TOO_SMALL) {		printf("Can't get the variable: error %#lx/n", status);		return (CMD_ERROR);	}	data = malloc(datasz);	status = RS->GetVariable(varnamearg, matchguid, &attr,	    &datasz, data);	if (status != EFI_SUCCESS) {		printf("Can't get the variable: error %#lx/n", status);		return (CMD_ERROR);	}	uuid_to_string((uuid_t *)matchguid, &str, &uuid_status);	if (lflag) {		printf("%s 0x%x %S", str, attr, varnamearg);	} else {		printf("%s 0x%x %S=", str, attr, varnamearg);		is_ascii = 1;		free(str);		str = (char *)data;		for (i = 0; i < datasz - 1; i++) {			/* Quick hack to see if this ascii-ish string printable range plus tab, cr and lf */			if ((str[i] < 32 || str[i] > 126) && str[i] != 9 && str[i] != 10 && str[i] != 13) {				is_ascii = 0;				break;			}		}		if (str[datasz - 1] != '/0')			is_ascii = 0;		if (is_ascii)			printf("%s", str);		else {			for (i = 0; i < datasz / 2; i++) {				if (isalnum(data[i]) || isspace(data[i]))					printf("%c", data[i]);				else					printf("//x%02x", data[i]);			}		}	}	free(data);	if (pager_output("/n"))		return (CMD_WARN);	return (CMD_OK);}
开发者ID:RichardsonAlex,项目名称:cheribsd,代码行数:58,


示例12: pn_i_genuuid

char* pn_i_genuuid(void) {    char *generated;    uuid_t uuid;    uint32_t rc;    uuid_create(&uuid, &rc);    // Under FreeBSD the returned string is newly allocated from the heap    uuid_to_string(&uuid, &generated, &rc);    return generated;}
开发者ID:ModusCreateOrg,项目名称:deb-qpid-proton,代码行数:9,


示例13: log_app_info

// ------------------------------------------------------------------------ ////  Main Functions// ------------------------------------------------------------------------ //void log_app_info() {    extern const PebbleProcessInfo __pbl_app_info;    LOG("APP Version: %d.%d", __pbl_app_info.process_version.major, __pbl_app_info.process_version.minor);    LOG("Name: %s", __pbl_app_info.name);    LOG("Company: %s", __pbl_app_info.company);    char uuidString[UUID_STRING_BUFFER_LENGTH];    uuid_to_string((Uuid*)&__pbl_app_info.uuid, uuidString);    LOG("UUID: %s", uuidString);}
开发者ID:robisodd,项目名称:TapDetection,代码行数:12,


示例14: uuid

static const char *uuid(uuid_t *id){	static char buffer[64];	char *s;	uuid_to_string(id, &s, NULL);	strcpy(buffer, s);	free(s);	return (buffer);}
开发者ID:edgar-pek,项目名称:PerspicuOS,代码行数:11,


示例15: subscribe_handler

static void subscribe_handler(BLECharacteristic characteristic,                              BLESubscription subscription_type,                              BLEGATTError error) {  char uuid_buffer[UUID_STRING_BUFFER_LENGTH];  Uuid characteristic_uuid = ble_characteristic_get_uuid(characteristic);  uuid_to_string(&characteristic_uuid, uuid_buffer);  APP_LOG(APP_LOG_LEVEL_INFO, "Subscription to Characteristic %s (subscription_type=%u, error=%u)",          uuid_buffer, subscription_type, error);}
开发者ID:gitizenme,项目名称:environator,代码行数:11,


示例16: hpss_get_bfid

static int hpss_get_bfid(struct fsal_obj_handle *fsal_obj_hdl,			 caddr_t buffer_addr,			 size_t buffer_size,			 size_t *p_output_size,			 void *arg){	struct hpss_fsal_obj_handle *obj_hdl;	sec_cred_t *p_ucreds = arg;	hpss_vattr_t hpss_vattr;	char *tmp_str_uuid;	int rc;	/* sanity checks. */	if (!fsal_obj_hdl || !p_output_size || !buffer_addr || !p_ucreds)		return ERR_FSAL_FAULT;	obj_hdl = container_of(fsal_obj_hdl,			       struct hpss_fsal_obj_handle,			       obj_handle);	rc = hpss_GetAttrHandle(&(obj_hdl->handle->ns_handle),				NULL,				p_ucreds,				NULL,				&hpss_vattr);	/**	 * /!/ WARNING : When the directory handle is stale, HPSS returns ENOTDIR.	 *     Thus, in this case, we must double check	 *     by checking the directory handle.	 */	if (rc == HPSS_ENOTDIR)		if (HPSSFSAL_IsStaleHandle(&obj_hdl->handle->ns_handle,					  p_ucreds))			return ERR_FSAL_STALE;	if (rc)		return hpss2fsal_error(rc);	uuid_to_string(&(hpss_vattr.va_soid.ObjectID),		      (char **)&tmp_str_uuid, &rc);	if (rc != 0)		return hpss2fsal_error(rc);	*p_output_size = snprintf(buffer_addr, buffer_size, "%s", tmp_str_uuid);	/* HPSS returns a string that it has just allocated.	 * Free it to avoid memory leak.	 */	free(tmp_str_uuid);	return 0;}
开发者ID:Anuradha-Talur,项目名称:nfs-ganesha,代码行数:54,


示例17: dmsg_uuid_to_str

const char *dmsg_uuid_to_str(uuid_t *uuid, char **strp){	uint32_t status;	if (*strp) {		free(*strp);		*strp = NULL;	}	uuid_to_string(uuid, strp, &status);	return (*strp);}
开发者ID:Gwenio,项目名称:DragonFlyBSD,代码行数:11,


示例18: uuuid_to_string

void uuuid_to_string(struct uuuid_t* uuuid, char** out, int* status){	uint32_t st;	uuid_to_string(&uuuid->uuid, out, &st);	if (st == uuid_s_ok)		*status = UUUID_OK;	else		*status = UUUID_ERR;}
开发者ID:jpalus,项目名称:libuuuid,代码行数:11,


示例19: guul_get_uuid

char *guul_get_uuid(){        uuid_t uuid;        uint32_t status;        char *result = NULL;        uuid_create (&uuid, &status);        uuid_to_string (&uuid, &result, &status);        return result;}
开发者ID:ovtn,项目名称:gupnp,代码行数:12,


示例20: guard

    void ConfigurationPrivate::save()    {        QMutexLocker guard(&mutex);        QString key(uuid_to_string(id));        // Read configuration        QSettings conf;        conf.beginGroup("Configurations");        conf.beginGroup(key);        QByteArray ciphertext = encryptMap(data, key);        conf.setValue("data", ciphertext);        conf.setValue("title", title);    }
开发者ID:project-renard-survey,项目名称:utopia-documents-mirror,代码行数:13,


示例21: uuid

const std::string uuid (){  uuid_t id;  uint32_t status;  char *buffer (0);  uuid_create (&id, &status);  uuid_to_string (&id, &buffer, &status);  std::string res (buffer);  free (buffer);  return res;}
开发者ID:JensErat,项目名称:task,代码行数:13,


示例22: main

intmain(int argc, char **argv){    char str[1000];    afsUUID u1, u2;    uuid_create(&u1);    uuid_to_string(&u1, str, sizeof(str));    printf("u: %s/n", str);    return 0;}
开发者ID:aruanruan,项目名称:reveldb,代码行数:14,


示例23: uuid_create

zmq::uuid_t::uuid_t (){#ifdef ZMQ_HAVE_HPUX    unsigned32 status;#else    uint32_t status;#endif    uuid_create (&uuid, &status);    zmq_assert (status == uuid_s_ok);    uuid_to_string (&uuid, &string_buf, &status);    zmq_assert (status == uuid_s_ok);    create_blob ();}
开发者ID:jimon,项目名称:mongrel2_c_sample,代码行数:14,


示例24: special_uuid_value

static Datumspecial_uuid_value(const char *name){	uuid_t	   *uuid = get_cached_uuid_t(0);	char	   *str;	uuid_rc_t	rc;	rc = uuid_load(uuid, name);	if (rc != UUID_RC_OK)		pguuid_complain(rc);	str = uuid_to_string(uuid);	return DirectFunctionCall1(uuid_in, CStringGetDatum(str));}
开发者ID:FilipinOTech,项目名称:postgres,代码行数:14,


示例25: uuid_generate_internal

/* len is unused with OSSP, but we want to have the same number of args */static Datumuuid_generate_internal(int mode, const uuid_t *ns, const char *name, int len){	uuid_t	   *uuid = get_cached_uuid_t(0);	char	   *str;	uuid_rc_t	rc;	rc = uuid_make(uuid, mode, ns, name);	if (rc != UUID_RC_OK)		pguuid_complain(rc);	str = uuid_to_string(uuid);	return DirectFunctionCall1(uuid_in, CStringGetDatum(str));}
开发者ID:FilipinOTech,项目名称:postgres,代码行数:15,


示例26: descriptor_read_handler

static void descriptor_read_handler(BLEDescriptor descriptor,                                    const uint8_t *value,                                    size_t value_length,                                    uint16_t value_offset,                                    BLEGATTError error) {  char uuid_buffer[UUID_STRING_BUFFER_LENGTH];  Uuid descriptor_uuid = ble_descriptor_get_uuid(descriptor);  uuid_to_string(&descriptor_uuid, uuid_buffer);  APP_LOG(APP_LOG_LEVEL_INFO, "Read Descriptor %s, %u bytes, error: %u", uuid_buffer, value_length, error);  for (size_t i = 0; i < value_length; ++i) {    APP_LOG(APP_LOG_LEVEL_INFO, "0x%02x", value[i]);  }}
开发者ID:gitizenme,项目名称:environator,代码行数:14,


示例27: rpc_ns__ldap_export_server

/* * Create an LDAP server container entry. */static void rpc_ns__ldap_export_server(LDAP *ld,	char *dn,	rpc_if_handle_t if_spec,	unsigned32 *status	){	unsigned_char_p_t uuid = NULL;	rpc_if_id_t if_id;	LDAPMod *modV[4];	LDAPMod modRpcNsObjectID, modObjectClass;	char *valueRpcNsObjectID[2], *valueObjectClass[3];	rpc_if_inq_id(if_spec, &if_id, status);	if (*status != rpc_s_ok) {		return;	}	uuid_to_string(&if_id.uuid, &uuid, status);	if (*status != rpc_s_ok) {		return;	}	valueRpcNsObjectID[0] = uuid;	valueRpcNsObjectID[1] = NULL;	modRpcNsObjectID.mod_op = LDAP_MOD_ADD;	modRpcNsObjectID.mod_type = "rpcNsObjectID";	modRpcNsObjectID.mod_values = valueRpcNsObjectID;	valueObjectClass[0] = "rpcServer";	valueObjectClass[1] = "rpcEntry";	valueObjectClass[2] = "top";	modObjectClass.mod_op = LDAP_MOD_ADD;	modObjectClass.mod_type = "objectClass";	modObjectClass.mod_values = valueObjectClass;	modV[0] = &modRpcNsObjectID;	modV[1] = &modObjectClass;	modV[2] = NULL;	if (ldap_add_s(ld, dn, modV) != LDAP_SUCCESS) {		*status = rpc_s_update_failed;	} else {		*status = rpc_s_ok;	}	rpc_string_free(&uuid, status);}
开发者ID:HumbleRepose,项目名称:dcerpc,代码行数:52,


示例28: node_debug

//void node_debug(struct NodeState *nodeState, char *fmt, ...)void node_debug(struct NodeState *nodeState, ...){	va_list arg;	char s[BUFSIZE];	va_start(arg, nodeState);	char *fmt = va_arg(arg, char*);	vsnprintf(s, BUFSIZE, fmt, arg);	va_end(arg);	uuid_to_string(nodeID, nodeState->self->ID)	printf("%lld %s: %s/n", getClock(), nodeID, s);}
开发者ID:alexcb,项目名称:Chuckdaw,代码行数:16,



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


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