Class Parcel
Definition
- Namespace:
- Tizen.Applications.RPCPort
- Assembly:
- Tizen.Applications.Common.dll
- API Level:
- 5
The class that helps to perform marshalling and unmarshalling for RPC.
C#Copypublic class Parcel : IDisposable
- Inheritance
-
Parcel
Constructors
Declaration
C#Copypublic Parcel()
Exceptions
Type | Condition |
---|---|
InvalidIOException | Thrown when an internal IO error occurs. |
API Level: 5
Declaration
C#Copypublic Parcel(bool withHeader)
Parameters
Type | Name | Description |
---|---|---|
Boolean | withHeader | If it's false, the parcel object does not have the header. |
Exceptions
Type | Condition |
---|---|
InvalidIOException | Thrown when an internal IO error occurs. |
API Level: 11
Declaration
C#Copypublic Parcel(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | bytes | The raw bytes. |
Exceptions
Type | Condition |
---|---|
InvalidIOException | Thrown when an internal IO error occurs. |
API Level: 9
Declaration
C#Copypublic Parcel(Port port)
Parameters
Type | Name | Description |
---|---|---|
Port | port | Port object. |
Exceptions
Type | Condition |
---|---|
InvalidIOException | Thrown when an internal IO error occurs. |
API Level: 5
Methods
Declaration
C#Copypublic void Dispose()
API Level: 5
Declaration
C#Copyprotected void Finalize()
Declaration
C#Copypublic ParcelHeader GetHeader()
Returns
Type | Description |
---|---|
ParcelHeader | Parcel header |
API Level: 9
Declaration
C#Copypublic byte[] Read(int size)
Parameters
Type | Name | Description |
---|---|---|
Int32 | size | Bytes to read. |
Returns
Type | Description |
---|---|
Byte[] | Array of bytes. |
API Level: 5
Declaration
C#Copypublic int ReadArrayCount()
Returns
Type | Description |
---|---|
Int32 | Array count. |
API Level: 5
Declaration
C#Copypublic bool ReadBool()
Returns
Type | Description |
---|---|
Boolean | bool data. |
API Level: 5
Declaration
C#Copypublic Bundle ReadBundle()
Returns
Type | Description |
---|---|
Bundle | Bundle data. |
API Level: 5
Declaration
C#Copypublic byte ReadByte()
Returns
Type | Description |
---|---|
Byte | byte data. |
API Level: 5
Declaration
C#Copypublic double ReadDouble()
Returns
Type | Description |
---|---|
Double | double data. |
API Level: 5
Declaration
C#Copypublic float ReadFloat()
Returns
Type | Description |
---|---|
Single | float data. |
API Level: 5
Declaration
C#Copypublic int ReadInt()
Returns
Type | Description |
---|---|
Int32 | int data. |
API Level: 5
Declaration
C#Copypublic long ReadLong()
Returns
Type | Description |
---|---|
Int64 | long data. |
API Level: 5
Declaration
C#Copypublic short ReadShort()
Returns
Type | Description |
---|---|
Int16 | short data. |
API Level: 5
Declaration
C#Copypublic string ReadString()
Returns
Type | Description |
---|---|
String | string data. |
API Level: 5
Declaration
C#Copypublic void Send(Port p)
Parameters
Type | Name | Description |
---|---|---|
Port | p | The RPC port object for writing data. |
Exceptions
Type | Condition |
---|---|
InvalidIOException | Thrown when an internal IO error occurs. |
API Level: 5
Declaration
C#Copypublic byte[] ToBytes()
Returns
Type | Description |
---|---|
Byte[] | The raw bytes of the parcel. |
Exceptions
Type | Condition |
---|---|
InvalidIOException | Thrown when an internal IO error occurs. |
API Level: 9
Declaration
C#Copypublic void Write(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | bytes | Array of bytes. |
API Level: 5
Declaration
C#Copypublic void WriteArrayCount(int cnt)
Parameters
Type | Name | Description |
---|---|---|
Int32 | cnt | Array count. |
API Level: 5
Declaration
C#Copypublic void WriteBool(bool b)
Parameters
Type | Name | Description |
---|---|---|
Boolean | b | bool data. |
API Level: 5
Declaration
C#Copypublic void WriteBundle(Bundle b)
Parameters
Type | Name | Description |
---|---|---|
Bundle | b | Bundle data. |
API Level: 5
Declaration
C#Copypublic void WriteByte(byte b)
Parameters
Type | Name | Description |
---|---|---|
Byte | b | byte data. |
API Level: 5
Declaration
C#Copypublic void WriteDouble(double b)
Parameters
Type | Name | Description |
---|---|---|
Double | b | double data. |
API Level: 5
Declaration
C#Copypublic void WriteFloat(float b)
Parameters
Type | Name | Description |
---|---|---|
Single | b | float data. |
API Level: 5
Declaration
C#Copypublic void WriteInt(int b)
Parameters
Type | Name | Description |
---|---|---|
Int32 | b | int data. |
API Level: 5
Declaration
C#Copypublic void WriteLong(long b)
Parameters
Type | Name | Description |
---|---|---|
Int64 | b | long data. |
API Level: 5
Declaration
C#Copypublic void WriteShort(short b)
Parameters
Type | Name | Description |
---|---|---|
Int16 | b | short data. |
API Level: 5
Declaration
C#Copypublic void WriteString(string b)
Parameters
Type | Name | Description |
---|---|---|
String | b | string data. |