Class Parcel
Definition
- Namespace:
- Tizen.Applications.RPCPort
- Assembly:
- Tizen.Applications.Common.dll
The class that helps to perform marshalling and unmarshalling for RPC.
C#Copypublic class Parcel : IDisposable
- Inheritance
-
objectParcel
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copypublic Parcel()
Exceptions
| Type | Condition |
|---|---|
| InvalidIOException | Thrown when an internal IO error occurs. |
Declaration
C#Copypublic Parcel(bool withHeader)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | withHeader | If it's false, the parcel object does not have the header. |
Exceptions
| Type | Condition |
|---|---|
| InvalidIOException | Thrown when an internal IO error occurs. |
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. |
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. |
Methods
Declaration
C#Copypublic void Dispose()
Declaration
C#Copyprotected ~Parcel()
Declaration
C#Copypublic ParcelHeader GetHeader()
Returns
| Type | Description |
|---|---|
| ParcelHeader | Parcel header |
Declaration
C#Copypublic byte[] Read(int size)
Parameters
| Type | Name | Description |
|---|---|---|
| int | size | Bytes to read. |
Returns
| Type | Description |
|---|---|
| byte[] | Array of bytes. |
Declaration
C#Copypublic int ReadArrayCount()
Returns
| Type | Description |
|---|---|
| int | Array count. |
Declaration
C#Copypublic bool ReadBool()
Returns
| Type | Description |
|---|---|
| bool | bool data. |
Declaration
C#Copypublic Bundle ReadBundle()
Returns
| Type | Description |
|---|---|
| Bundle | Bundle data. |
Declaration
C#Copypublic byte ReadByte()
Returns
| Type | Description |
|---|---|
| byte | byte data. |
Declaration
C#Copypublic double ReadDouble()
Returns
| Type | Description |
|---|---|
| double | double data. |
Declaration
C#Copypublic float ReadFloat()
Returns
| Type | Description |
|---|---|
| float | float data. |
Declaration
C#Copypublic int ReadInt()
Returns
| Type | Description |
|---|---|
| int | int data. |
Declaration
C#Copypublic long ReadLong()
Returns
| Type | Description |
|---|---|
| long | long data. |
Declaration
C#Copypublic short ReadShort()
Returns
| Type | Description |
|---|---|
| short | short data. |
Declaration
C#Copypublic string ReadString()
Returns
| Type | Description |
|---|---|
| string | string data. |
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. |
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. |
Declaration
C#Copypublic void Write(byte[] bytes)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | bytes | Array of bytes. |
Declaration
C#Copypublic void WriteArrayCount(int cnt)
Parameters
| Type | Name | Description |
|---|---|---|
| int | cnt | Array count. |
Declaration
C#Copypublic void WriteBool(bool b)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | b | bool data. |
Declaration
C#Copypublic void WriteBundle(Bundle b)
Parameters
| Type | Name | Description |
|---|---|---|
| Bundle | b | Bundle data. |
Declaration
C#Copypublic void WriteByte(byte b)
Parameters
| Type | Name | Description |
|---|---|---|
| byte | b | byte data. |
Declaration
C#Copypublic void WriteDouble(double b)
Parameters
| Type | Name | Description |
|---|---|---|
| double | b | double data. |
Declaration
C#Copypublic void WriteFloat(float b)
Parameters
| Type | Name | Description |
|---|---|---|
| float | b | float data. |
Declaration
C#Copypublic void WriteInt(int b)
Parameters
| Type | Name | Description |
|---|---|---|
| int | b | int data. |
Declaration
C#Copypublic void WriteLong(long b)
Parameters
| Type | Name | Description |
|---|---|---|
| long | b | long data. |
Declaration
C#Copypublic void WriteShort(short b)
Parameters
| Type | Name | Description |
|---|---|---|
| short | b | short data. |
Declaration
C#Copypublic void WriteString(string b)
Parameters
| Type | Name | Description |
|---|---|---|
| string | b | string data. |
Implements
System.IDisposable