| 
    Tizen Native API
    5.5
    
   
   | 
  
  
  
 
The RPC Port Parcel API provides functions to make parcel data.
#include <rpc-port-parcel.h>
It is container for a data that can be sent via RPCPort.
Functions | |
| int | rpc_port_parcel_create (rpc_port_parcel_h *h) | 
| Creates a rpc port parcel handle.   | |
| int | rpc_port_parcel_create_from_port (rpc_port_parcel_h *h, rpc_port_h port) | 
| Creates a rpc port parcel handle from port.   | |
| int | rpc_port_parcel_send (rpc_port_parcel_h h, rpc_port_h port) | 
| Sends parcel data through the port.   | |
| int | rpc_port_parcel_destroy (rpc_port_parcel_h h) | 
| Destroys a rpc port parcel handle.   | |
| int | rpc_port_parcel_write_byte (rpc_port_parcel_h h, char b) | 
| Writes a byte value into rpc port parcel handle.   | |
| int | rpc_port_parcel_write_int16 (rpc_port_parcel_h h, short i) | 
| Writes a short value into rpc port parcel handle.   | |
| int | rpc_port_parcel_write_int32 (rpc_port_parcel_h h, int i) | 
| Writes a integer value into rpc port parcel handle.   | |
| int | rpc_port_parcel_write_int64 (rpc_port_parcel_h h, long long i) | 
| Writes a long long integer value into rpc port parcel handle.   | |
| int | rpc_port_parcel_write_float (rpc_port_parcel_h h, float f) | 
| Writes a floating point value into rpc port parcel handle.   | |
| int | rpc_port_parcel_write_double (rpc_port_parcel_h h, double d) | 
| Writes a double precision floating point value into rpc port parcel handle.   | |
| int | rpc_port_parcel_write_string (rpc_port_parcel_h h, const char *str) | 
| Writes a string value into rpc port parcel handle.   | |
| int | rpc_port_parcel_write_bool (rpc_port_parcel_h h, bool b) | 
| Writes a boolean value into rpc port parcel handle.   | |
| int | rpc_port_parcel_write_bundle (rpc_port_parcel_h h, bundle *b) | 
| Writes a bundle data into rpc port parcel handle.   | |
| int | rpc_port_parcel_write_array_count (rpc_port_parcel_h h, int count) | 
| Writes a count for array into rpc port parcel handle.   | |
| int | rpc_port_parcel_write (rpc_port_parcel_h h, rpc_port_parcelable_t *parcelable, void *data) | 
| Writes the data into parcel handle using parcelable.   | |
| int | rpc_port_parcel_read_byte (rpc_port_parcel_h h, char *b) | 
| Reads a byte value from rpc port parcel handle.   | |
| int | rpc_port_parcel_read_int16 (rpc_port_parcel_h h, short *i) | 
| Reads a short value from rpc port parcel handle.   | |
| int | rpc_port_parcel_read_int32 (rpc_port_parcel_h h, int *i) | 
| Reads a integer value from rpc port parcel handle.   | |
| int | rpc_port_parcel_read_int64 (rpc_port_parcel_h h, long long *i) | 
| Reads a long long integer value from rpc port parcel handle.   | |
| int | rpc_port_parcel_read_float (rpc_port_parcel_h h, float *f) | 
| Reads a floating point value from rpc port parcel handle.   | |
| int | rpc_port_parcel_read_double (rpc_port_parcel_h h, double *d) | 
| Reads a double precision floating point value from rpc port parcel handle.   | |
| int | rpc_port_parcel_read_string (rpc_port_parcel_h h, char **str) | 
| Reads a string value from rpc port parcel handle.   | |
| int | rpc_port_parcel_read_bool (rpc_port_parcel_h h, bool *b) | 
| Reads a boolean value from rpc port parcel handle.   | |
| int | rpc_port_parcel_read_bundle (rpc_port_parcel_h h, bundle **b) | 
| Reads a bundle data from rpc port parcel handle.   | |
| int | rpc_port_parcel_read_array_count (rpc_port_parcel_h h, int *count) | 
| Reads a count for array from rpc port parcel handle.   | |
| int | rpc_port_parcel_read (rpc_port_parcel_h h, rpc_port_parcelable_t *parcelable, void *data) | 
| Reads a parcel from the data using parcelable.   | |
| int | rpc_port_parcel_burst_read (rpc_port_parcel_h h, unsigned char *buf, unsigned int size) | 
| Reads bytes from rpc port parcel handle.   | |
| int | rpc_port_parcel_burst_write (rpc_port_parcel_h h, const unsigned char *buf, unsigned int size) | 
| Writes bytes to rpc port parcel handle.   | |
Typedefs | |
| typedef void * | rpc_port_parcel_h | 
| The rpc port parcel handle.   | |
| typedef struct  __rpc_port_parcelable  | rpc_port_parcelable_t | 
| The interface for converting data to/from a parcel.   | |
| typedef void* rpc_port_parcel_h | 
The rpc port parcel handle.
| typedef struct __rpc_port_parcelable rpc_port_parcelable_t | 
The interface for converting data to/from a parcel.
| int rpc_port_parcel_burst_read | ( | rpc_port_parcel_h | h, | 
| unsigned char * | buf, | ||
| unsigned int | size | ||
| ) | 
Reads bytes from rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [out] | buf | The array buffer to read | 
| [in] | size | Bytes to read | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_burst_write | ( | rpc_port_parcel_h | h, | 
| const unsigned char * | buf, | ||
| unsigned int | size | ||
| ) | 
Writes bytes to rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [in] | buf | The array buffer to write | 
| [in] | size | Bytes to write | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_create | ( | rpc_port_parcel_h * | h | ) | 
Creates a rpc port parcel handle.
| [out] | h | The rpc port parcel handle that is newly created | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | Invalid parameter | 
| int rpc_port_parcel_create_from_port | ( | rpc_port_parcel_h * | h, | 
| rpc_port_h | port | ||
| ) | 
Creates a rpc port parcel handle from port.
Creates a rpc port parcel handle using read data from the port. It calls rpc_port_read() internally.
| [out] | h | The rpc port parcel handle that is newly created | 
| [in] | port | The rpc port handle for creating handle | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified port is NULL | 
| RPC_PORT_ERROR_IO_ERROR | Internal I/O error | 
| int rpc_port_parcel_destroy | ( | rpc_port_parcel_h | h | ) | 
Destroys a rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_read | ( | rpc_port_parcel_h | h, | 
| rpc_port_parcelable_t * | parcelable, | ||
| void * | data | ||
| ) | 
Reads a parcel from the data using parcelable.
| [in] | h | The rpc port parcel handle | 
| [in] | parcelable | The interface to get data from parcel handle | 
| [in] | data | Data which get from parcel | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_read_array_count | ( | rpc_port_parcel_h | h, | 
| int * | count | ||
| ) | 
Reads a count for array from rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [out] | count | Array count | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_read_bool | ( | rpc_port_parcel_h | h, | 
| bool * | b | ||
| ) | 
Reads a boolean value from rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [out] | b | boolean data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_read_bundle | ( | rpc_port_parcel_h | h, | 
| bundle ** | b | ||
| ) | 
Reads a bundle data from rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [out] | b | Bundle data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_read_byte | ( | rpc_port_parcel_h | h, | 
| char * | b | ||
| ) | 
Reads a byte value from rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [out] | b | Byte data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_read_double | ( | rpc_port_parcel_h | h, | 
| double * | d | ||
| ) | 
Reads a double precision floating point value from rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [out] | d | double data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_read_float | ( | rpc_port_parcel_h | h, | 
| float * | f | ||
| ) | 
Reads a floating point value from rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [out] | f | float data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_read_int16 | ( | rpc_port_parcel_h | h, | 
| short * | i | ||
| ) | 
Reads a short value from rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [out] | i | short data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_read_int32 | ( | rpc_port_parcel_h | h, | 
| int * | i | ||
| ) | 
Reads a integer value from rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [out] | i | int data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_read_int64 | ( | rpc_port_parcel_h | h, | 
| long long * | i | ||
| ) | 
Reads a long long integer value from rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [out] | i | long long data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_read_string | ( | rpc_port_parcel_h | h, | 
| char ** | str | ||
| ) | 
Reads a string value from rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [out] | str | string data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_send | ( | rpc_port_parcel_h | h, | 
| rpc_port_h | port | ||
| ) | 
Sends parcel data through the port.
Sends parcel data through the port. It calls rpc_port_write() internally.
| [in] | h | The rpc port parcel handle that is newly created | 
| [in] | port | The rpc port handle for writing data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| RPC_PORT_ERROR_IO_ERROR | Internal I/O error | 
| int rpc_port_parcel_write | ( | rpc_port_parcel_h | h, | 
| rpc_port_parcelable_t * | parcelable, | ||
| void * | data | ||
| ) | 
Writes the data into parcel handle using parcelable.
| [in] | h | The rpc port parcel handle | 
| [in] | parcelable | The interface to write the data into parcel handle | 
| [in] | data | Data which write into parcel | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_write_array_count | ( | rpc_port_parcel_h | h, | 
| int | count | ||
| ) | 
Writes a count for array into rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [in] | count | Array count | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_write_bool | ( | rpc_port_parcel_h | h, | 
| bool | b | ||
| ) | 
Writes a boolean value into rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [in] | b | boolean data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_write_bundle | ( | rpc_port_parcel_h | h, | 
| bundle * | b | ||
| ) | 
Writes a bundle data into rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [in] | b | Bundle data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_write_byte | ( | rpc_port_parcel_h | h, | 
| char | b | ||
| ) | 
Writes a byte value into rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [in] | b | Byte data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_write_double | ( | rpc_port_parcel_h | h, | 
| double | d | ||
| ) | 
Writes a double precision floating point value into rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [in] | d | double data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_write_float | ( | rpc_port_parcel_h | h, | 
| float | f | ||
| ) | 
Writes a floating point value into rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [in] | f | float data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_write_int16 | ( | rpc_port_parcel_h | h, | 
| short | i | ||
| ) | 
Writes a short value into rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [in] | i | short data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_write_int32 | ( | rpc_port_parcel_h | h, | 
| int | i | ||
| ) | 
Writes a integer value into rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [in] | i | int data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_write_int64 | ( | rpc_port_parcel_h | h, | 
| long long | i | ||
| ) | 
Writes a long long integer value into rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [in] | i | long long data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL | 
| int rpc_port_parcel_write_string | ( | rpc_port_parcel_h | h, | 
| const char * | str | ||
| ) | 
Writes a string value into rpc port parcel handle.
| [in] | h | The rpc port parcel handle | 
| [in] | str | string data | 
0 on success, otherwise a negative error value | RPC_PORT_ERROR_NONE | Successful | 
| RPC_PORT_ERROR_INVALID_PARAMETER | The specified h is NULL |