当前位置: 首页>>代码示例>>C++>>正文


C++ xdr_send_uint32函数代码示例

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


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

示例1: npa_remote_issue_required_request_arg_fn

static int npa_remote_issue_required_request_arg_fn(
		struct msm_rpc_client *client,
		struct msm_rpc_xdr *xdr, void *data)
{
	struct npa_remote_issue_required_request_arg *arg = data;

	xdr_send_uint32(xdr, &arg->handle);
	xdr_send_uint32(xdr, &arg->state);
	xdr_send_uint32(xdr, &arg->new_state_valid);

	return 0;
}
开发者ID:0-t,项目名称:samsung-kernel-msm7x30,代码行数:12,代码来源:npa_remote_rpc_client.c

示例2: oem_rapi_client_streaming_function_arg

static int oem_rapi_client_streaming_function_arg(struct msm_rpc_client *client,
						  struct msm_rpc_xdr *xdr,
						  void *data)
{
	int cb_id;
	struct oem_rapi_client_streaming_func_arg *arg = data;

	cb_id = msm_rpc_add_cb_func(client, (void *)arg->cb_func);
	if ((cb_id < 0) && (cb_id != MSM_RPC_CLIENT_NULL_CB_ID))
		return cb_id;

	xdr_send_uint32(xdr, &arg->event);                /* enum */
	xdr_send_uint32(xdr, &cb_id);                     /* cb_id */
	xdr_send_uint32(xdr, (uint32_t *)(&arg->handle)); /* handle */
	xdr_send_uint32(xdr, &arg->in_len);               /* in_len */
	xdr_send_bytes(xdr, (const void **)&arg->input,
			     &arg->in_len);                     /* input */
	xdr_send_uint32(xdr, &arg->out_len_valid);        /* out_len */
	
#ifdef FEATURE_SKY_RPC_OEM_RAPI_NEW_INTERFACE
	xdr_send_uint32(xdr, &arg->output_size);
#endif/* FEATURE_SKY_RPC_OEM_RAPI_NEW_INTERFACE */

	xdr_send_uint32(xdr, &arg->output_valid);         /* output */

	/* output_size */
	if (arg->output_valid)
		xdr_send_uint32(xdr, &arg->output_size);

	return 0;
}
开发者ID:bestmjh47,项目名称:android_kernel_sky_ef30s,代码行数:31,代码来源:oem_rapi_client.c

示例3: ping_mdm_register_arg

static int ping_mdm_register_arg(struct msm_rpc_client *client,
				 struct msm_rpc_xdr *xdr, void *data)
{
	struct ping_mdm_register_arg *arg = data;
	int cb_id;

	cb_id = msm_rpc_add_cb_func(client, (void *)arg->cb_func);
	if ((cb_id < 0) && (cb_id != MSM_RPC_CLIENT_NULL_CB_ID))
		return cb_id;

	xdr_send_uint32(xdr, &cb_id);             /* cb_id */
	xdr_send_uint32(xdr, &arg->num);          /* num */

	return 0;
}
开发者ID:Malpa73,项目名称:FeraLab_GB_Firmware--archive,代码行数:15,代码来源:ping_mdm_rpc_client.c

示例4: oem_rapi_client_streaming_function_arg

int oem_rapi_client_streaming_function_arg(struct msm_rpc_client *client,
						  struct msm_rpc_xdr *xdr,
						  void *data)
{
	int cb_id;
	struct oem_rapi_client_streaming_func_arg *arg = data;

	cb_id = msm_rpc_add_cb_func(client, (void *)arg->cb_func);
	if ((cb_id < 0) && (cb_id != MSM_RPC_CLIENT_NULL_CB_ID))
		return cb_id;

	xdr_send_uint32(xdr, &arg->event);                
	xdr_send_uint32(xdr, &cb_id);                     
	xdr_send_uint32(xdr, (uint32_t *)(&arg->handle)); 
	xdr_send_uint32(xdr, &arg->in_len);               
	xdr_send_bytes(xdr, (const void **)&arg->input,
			     &arg->in_len);                     
	xdr_send_uint32(xdr, &arg->out_len_valid);        
	xdr_send_uint32(xdr, &arg->output_valid);         

	
	if (arg->output_valid)
		xdr_send_uint32(xdr, &arg->output_size);

	return 0;
}
开发者ID:Drgravy,项目名称:kernel_htc_m7,代码行数:26,代码来源:htc_sdservice.c

示例5: npa_remote_destroy_client_arg_fn

static int npa_remote_destroy_client_arg_fn(struct msm_rpc_client *client,
		struct msm_rpc_xdr *xdr, void *data)
{
	struct npa_remote_destroy_client_arg *arg = data;

	xdr_send_uint32(xdr, &arg->handle);

	return 0;
}
开发者ID:0-t,项目名称:samsung-kernel-msm7x30,代码行数:9,代码来源:npa_remote_rpc_client.c

示例6: npa_remote_init_arg_fn

static int npa_remote_init_arg_fn(struct msm_rpc_client *client,
		struct msm_rpc_xdr *xdr, void *data)
{
	struct npa_remote_init_arg *arg = data;
	unsigned int cb_id = 0;

	cb_id = msm_rpc_add_cb_func(client, (void *)arg->callback);
	if (cb_id < 0 && (cb_id != MSM_RPC_CLIENT_NULL_CB_ID))
		return cb_id;

	xdr_send_uint32(xdr, &arg->major);
	xdr_send_uint32(xdr, &arg->minor);
	xdr_send_uint32(xdr, &arg->build);
	xdr_send_uint32(xdr, &cb_id);
	xdr_send_uint32(xdr, &arg->context);

	return 0;
}
开发者ID:0-t,项目名称:samsung-kernel-msm7x30,代码行数:18,代码来源:npa_remote_rpc_client.c

示例7: ping_mdm_data_register_arg

static int ping_mdm_data_register_arg(struct msm_rpc_client *client,
				      struct msm_rpc_xdr *xdr, void *data)
{
	struct ping_mdm_data_arg *arg = data;

	/* data */
	xdr_send_array(xdr, (void **)&arg->data, &arg->size, 64,
	       sizeof(uint32_t), (void *)xdr_send_uint32);

	xdr_send_uint32(xdr, &arg->size);             /* size */

	return 0;
}
开发者ID:Malpa73,项目名称:FeraLab_GB_Firmware--archive,代码行数:13,代码来源:ping_mdm_rpc_client.c

示例8: npa_remote_resource_available_arg_fn

static int npa_remote_resource_available_arg_fn(struct msm_rpc_client *client,
		struct msm_rpc_xdr *xdr, void *data)
{
	struct npa_remote_resource_available_arg *arg = data;
	unsigned int cb_id = 0;
	int len = 0;

	cb_id = msm_rpc_add_cb_func(client, (void *)arg->callback);
	if (cb_id < 0 && (cb_id != MSM_RPC_CLIENT_NULL_CB_ID))
		return cb_id;

	if (arg->resource_name) {
		len = strlen(arg->resource_name) + 1;
		xdr_send_bytes(xdr, (const void **)&arg->resource_name, &len);
	} else {
		xdr_send_uint32(xdr, &len);
	}
	xdr_send_uint32(xdr, &cb_id);
	xdr_send_uint32(xdr, &arg->context);

	return 0;
}
开发者ID:0-t,项目名称:samsung-kernel-msm7x30,代码行数:22,代码来源:npa_remote_rpc_client.c

示例9: npa_remote_create_sync_client_arg_fn

static int npa_remote_create_sync_client_arg_fn(struct msm_rpc_client *client,
		struct msm_rpc_xdr *xdr, void *data)
{
	struct npa_remote_create_sync_client_arg *arg = data;
	int len = 0;

	if (arg->resource_name) {
		len = strlen(arg->resource_name) + 1;
		xdr_send_bytes(xdr, (const void **)&arg->resource_name, &len);
	} else {
		xdr_send_uint32(xdr, &len);
	}
	if (arg->client_name) {
		len = strlen(arg->client_name) + 1;
		xdr_send_bytes(xdr, (const void **)&arg->client_name, &len);
	} else {
		len = 0;
		xdr_send_uint32(xdr, &len);
	}
	xdr_send_uint32(xdr, &arg->client_type);
	xdr_send_uint32(xdr, &arg->handle_is_valid);

	return 0;
}
开发者ID:0-t,项目名称:samsung-kernel-msm7x30,代码行数:24,代码来源:npa_remote_rpc_client.c

示例10: xdr_send_pointer

int xdr_send_pointer(struct msm_rpc_xdr *xdr, void **obj,
		     uint32_t obj_size, void *xdr_op)
{
	uint32_t ptr_valid, rc;

	ptr_valid = (*obj != NULL);

	rc = xdr_send_uint32(xdr, &ptr_valid);
	if (rc)
		return rc;

	if (!ptr_valid)
		return 0;

	return ((int (*) (struct msm_rpc_xdr *, void *))xdr_op)(xdr, *obj);
}
开发者ID:0-t,项目名称:samsung-kernel-msm7x30,代码行数:16,代码来源:smd_rpcrouter_xdr.c

示例11: ping_mdm_data_cb

static int ping_mdm_data_cb(struct msm_rpc_client *client,
			    struct msm_rpc_xdr *xdr)
{
	int rc;
	void *cb_func;
	uint32_t size, accept_status;
	struct ping_mdm_register_data_cb_cb_arg arg;
	struct ping_mdm_register_data_cb_cb_ret ret;

	xdr_recv_uint32(xdr, &arg.cb_id);           /* cb_id */

	/* data */
	xdr_recv_array(xdr, (void **)(&(arg.data)), &size, 64,
		       sizeof(uint32_t), (void *)xdr_recv_uint32);

	xdr_recv_uint32(xdr, &arg.size);           /* size */
	xdr_recv_uint32(xdr, &arg.sum);            /* sum */

	cb_func = msm_rpc_get_cb_func(client, arg.cb_id);
	if (cb_func) {
		rc = ((int (*)
		       (struct ping_mdm_register_data_cb_cb_arg *,
			struct ping_mdm_register_data_cb_cb_ret *))
		      cb_func)(&arg, &ret);
		if (rc)
			accept_status = RPC_ACCEPTSTAT_SYSTEM_ERR;
		else
			accept_status = RPC_ACCEPTSTAT_SUCCESS;
	} else
		accept_status = RPC_ACCEPTSTAT_SYSTEM_ERR;

	xdr_start_accepted_reply(xdr, accept_status);

	if (accept_status == RPC_ACCEPTSTAT_SUCCESS)
		xdr_send_uint32(xdr, &ret.result);         /* result */

	rc = xdr_send_msg(xdr);
	if (rc)
		pr_err("%s: send accepted reply failed: %d\n", __func__, rc);

	kfree(arg.data);
	return rc;
}
开发者ID:Malpa73,项目名称:FeraLab_GB_Firmware--archive,代码行数:43,代码来源:ping_mdm_rpc_client.c

示例12: handle_lg_fw_helper_misc_blk_write

static int handle_lg_fw_helper_misc_blk_write(struct msm_rpc_xdr *xdr)
{
	int ret;
	struct lg_fw_helper_misc_blk_rpc arg;

	// get block number
	ret = xdr_recv_uint32(xdr, &arg.block_no);
	if (ret != 0)
		return ret;

	// get block data
	ret = xdr_recv_array(xdr, (void **)&arg.data, &arg.size, 128,
		       sizeof(uint32_t), (void *)xdr_recv_uint32);
	if (ret != 0)
		return ret;

	// write block data
	print_hex_dump(KERN_INFO, "data: ", DUMP_PREFIX_OFFSET, 16, 1, arg.data, 512, true);
	printk(KERN_ERR "[sunny] block num = %d \n", arg.block_no);
	
	ret = lge_emmc_wallpaper_write(arg.block_no, (unsigned char*) arg.data, 512);

	ret = xdr_start_accepted_reply(xdr, RPC_ACCEPTSTAT_SUCCESS);
	if (ret != 0)
		goto handle_lg_fw_helper_misc_blk_write_exit;

	ret = 0xabcdef12; // for debugging
	ret = xdr_send_uint32(xdr, &ret);
	if (ret != 0)
		goto handle_lg_fw_helper_misc_blk_write_exit;

	ret = xdr_send_msg(xdr);
	if (ret < 0)
		 pr_err("%s: sending reply failed\n", __func__);

handle_lg_fw_helper_misc_blk_write_exit:
	if (arg.data)
		kfree(arg.data);
	return 0;
}
开发者ID:F4uzan,项目名称:skernel_u0,代码行数:40,代码来源:lg_fw_helper.c

示例13: xdr_send_array

int xdr_send_array(struct msm_rpc_xdr *xdr, void **addr, uint32_t *size,
		   uint32_t maxsize, uint32_t elm_size, void *xdr_op)
{
	int i, rc;
	void *tmp_addr = *addr;

	if (!size || !tmp_addr || (*size > maxsize) || !xdr_op)
		return -1;

	rc = xdr_send_uint32(xdr, size);
	if (rc)
		return rc;

	for (i = 0; i < *size; i++) {
		rc = ((int (*) (struct msm_rpc_xdr *, void *))xdr_op)
			(xdr, tmp_addr);
		if (rc)
			return rc;

		tmp_addr += elm_size;
	}

	return 0;
}
开发者ID:0-t,项目名称:samsung-kernel-msm7x30,代码行数:24,代码来源:smd_rpcrouter_xdr.c

示例14: oem_rapi_client_cb

/* TODO: check where to allocate memory for return */
static int oem_rapi_client_cb(struct msm_rpc_client *client,
			      struct rpc_request_hdr *req,
			      struct msm_rpc_xdr *xdr)
{
	uint32_t cb_id, accept_status;
	int rc;
	void *cb_func;
	uint32_t temp;

	struct oem_rapi_client_streaming_func_cb_arg arg;
	struct oem_rapi_client_streaming_func_cb_ret ret;

	arg.input = NULL;
	ret.out_len = NULL;
	ret.output = NULL;

	xdr_recv_uint32(xdr, &cb_id);                    /* cb_id */
	xdr_recv_uint32(xdr, &arg.event);                /* enum */
	xdr_recv_uint32(xdr, (uint32_t *)(&arg.handle)); /* handle */
	xdr_recv_uint32(xdr, &arg.in_len);               /* in_len */
	xdr_recv_bytes(xdr, (void **)&arg.input, &temp); /* input */
	xdr_recv_uint32(xdr, &arg.out_len_valid);        /* out_len */
	if (arg.out_len_valid) {
		ret.out_len = kmalloc(sizeof(*ret.out_len), GFP_KERNEL);
		if (!ret.out_len) {
			accept_status = RPC_ACCEPTSTAT_SYSTEM_ERR;
			goto oem_rapi_send_ack;
		}
	}

	xdr_recv_uint32(xdr, &arg.output_valid);         /* out */
	if (arg.output_valid) {
		xdr_recv_uint32(xdr, &arg.output_size);  /* ouput_size */

		ret.output = kmalloc(arg.output_size, GFP_KERNEL);
		if (!ret.output) {
			accept_status = RPC_ACCEPTSTAT_SYSTEM_ERR;
			goto oem_rapi_send_ack;
		}
	}

	cb_func = msm_rpc_get_cb_func(client, cb_id);
	if (cb_func) {
		rc = ((int (*)(struct oem_rapi_client_streaming_func_cb_arg *,
			       struct oem_rapi_client_streaming_func_cb_ret *))
		      cb_func)(&arg, &ret);
		if (rc)
			accept_status = RPC_ACCEPTSTAT_SYSTEM_ERR;
		else
			accept_status = RPC_ACCEPTSTAT_SUCCESS;
	} else
		accept_status = RPC_ACCEPTSTAT_SYSTEM_ERR;

 oem_rapi_send_ack:
	xdr_start_accepted_reply(xdr, accept_status);

	if (accept_status == RPC_ACCEPTSTAT_SUCCESS) {
		uint32_t temp = sizeof(uint32_t);
		xdr_send_pointer(xdr, (void **)&(ret.out_len), temp,
				 xdr_send_uint32);

		/* output */
		if (ret.output && ret.out_len)
			xdr_send_bytes(xdr, (const void **)&ret.output,
					     ret.out_len);
		else {
			temp = 0;
			xdr_send_uint32(xdr, &temp);
		}
	}
	rc = xdr_send_msg(xdr);
	if (rc)
		pr_err("%s: sending reply failed: %d\n", __func__, rc);

	kfree(arg.input);
	kfree(ret.out_len);
	kfree(ret.output);

	return 0;
}
开发者ID:arjen75,项目名称:L3_kernel2,代码行数:81,代码来源:oem_rapi_client.c

示例15: xdr_send_int32

int xdr_send_int32(struct msm_rpc_xdr *xdr, const int32_t *value)
{
	return xdr_send_uint32(xdr, (uint32_t *)value);
}
开发者ID:0-t,项目名称:samsung-kernel-msm7x30,代码行数:4,代码来源:smd_rpcrouter_xdr.c


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