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#
Copy
public class Parcel : IDisposable
Inheritance
Parcel

Constructors

View Source

Parcel()

Constructor for this class.

Declaration
C#
Copy
public Parcel()
Exceptions
Type Condition
InvalidIOException

Thrown when an internal IO error occurs.

API Level: 5
View Source

Parcel(Boolean)

Constructor for this class.

Declaration
C#
Copy
public 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
View Source

Parcel(Byte[])

Constructor with the raw bytes.

Declaration
C#
Copy
public 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
View Source

Parcel(Port)

Constructor with port object.

Declaration
C#
Copy
public 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

View Source

Dispose()

Release all the resources used by the class Parcel.

Declaration
C#
Copy
public void Dispose()
API Level: 5
View Source

Finalize()

Finalizer of the class Parcel.

Declaration
C#
Copy
protected void Finalize()
View Source

GetHeader()

Gets header of rpc port parcel.

Declaration
C#
Copy
public ParcelHeader GetHeader()
Returns
Type Description
ParcelHeader

Parcel header

API Level: 9
View Source

Read(Int32)

Reads bytes from parcel object.

Declaration
C#
Copy
public byte[] Read(int size)
Parameters
Type Name Description
Int32 size

Bytes to read.

Returns
Type Description
Byte[]

Array of bytes.

API Level: 5
View Source

ReadArrayCount()

Reads a count of an array from parcel object.

Declaration
C#
Copy
public int ReadArrayCount()
Returns
Type Description
Int32

Array count.

API Level: 5
View Source

ReadBool()

Reads a bool value from parcel object.

Declaration
C#
Copy
public bool ReadBool()
Returns
Type Description
Boolean

bool data.

API Level: 5
View Source

ReadBundle()

Reads a Bundle value from parcel object.

Declaration
C#
Copy
public Bundle ReadBundle()
Returns
Type Description
Bundle

Bundle data.

API Level: 5
View Source

ReadByte()

Reads a byte value from parcel object.

Declaration
C#
Copy
public byte ReadByte()
Returns
Type Description
Byte

byte data.

API Level: 5
View Source

ReadDouble()

Reads a double value from parcel object.

Declaration
C#
Copy
public double ReadDouble()
Returns
Type Description
Double

double data.

API Level: 5
View Source

ReadFloat()

Reads a float value from parcel object.

Declaration
C#
Copy
public float ReadFloat()
Returns
Type Description
Single

float data.

API Level: 5
View Source

ReadInt()

Reads an int value from parcel object.

Declaration
C#
Copy
public int ReadInt()
Returns
Type Description
Int32

int data.

API Level: 5
View Source

ReadLong()

Reads a long value from parcel object.

Declaration
C#
Copy
public long ReadLong()
Returns
Type Description
Int64

long data.

API Level: 5
View Source

ReadShort()

Reads a short value from parcel object.

Declaration
C#
Copy
public short ReadShort()
Returns
Type Description
Int16

short data.

API Level: 5
View Source

ReadString()

Reads a string value from parcel object.

Declaration
C#
Copy
public string ReadString()
Returns
Type Description
String

string data.

API Level: 5
View Source

Send(Port)

Sends parcel data through the port.

Declaration
C#
Copy
public 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
View Source

ToBytes()

Gets the raw bytes of the parcel.

Declaration
C#
Copy
public 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
View Source

Write(Byte[])

Writes bytes into parcel object.

Declaration
C#
Copy
public void Write(byte[] bytes)
Parameters
Type Name Description
Byte[] bytes

Array of bytes.

API Level: 5
View Source

WriteArrayCount(Int32)

Writes a count of an array into parcel object.

Declaration
C#
Copy
public void WriteArrayCount(int cnt)
Parameters
Type Name Description
Int32 cnt

Array count.

API Level: 5
View Source

WriteBool(Boolean)

Writes a bool value into parcel object.

Declaration
C#
Copy
public void WriteBool(bool b)
Parameters
Type Name Description
Boolean b

bool data.

API Level: 5
View Source

WriteBundle(Bundle)

Writes a Bundle data into parcel object.

Declaration
C#
Copy
public void WriteBundle(Bundle b)
Parameters
Type Name Description
Bundle b

Bundle data.

API Level: 5
View Source

WriteByte(Byte)

Writes a byte value into parcel object.

Declaration
C#
Copy
public void WriteByte(byte b)
Parameters
Type Name Description
Byte b

byte data.

API Level: 5
View Source

WriteDouble(Double)

Writes a double value into parcel object.

Declaration
C#
Copy
public void WriteDouble(double b)
Parameters
Type Name Description
Double b

double data.

API Level: 5
View Source

WriteFloat(Single)

Writes a float value into parcel object.

Declaration
C#
Copy
public void WriteFloat(float b)
Parameters
Type Name Description
Single b

float data.

API Level: 5
View Source

WriteInt(Int32)

Writes an int value into parcel object.

Declaration
C#
Copy
public void WriteInt(int b)
Parameters
Type Name Description
Int32 b

int data.

API Level: 5
View Source

WriteLong(Int64)

Writes a long value into parcel object.

Declaration
C#
Copy
public void WriteLong(long b)
Parameters
Type Name Description
Int64 b

long data.

API Level: 5
View Source

WriteShort(Int16)

Writes a short value into parcel object.

Declaration
C#
Copy
public void WriteShort(short b)
Parameters
Type Name Description
Int16 b

short data.

API Level: 5
View Source

WriteString(String)

Writes a string value into parcel object.

Declaration
C#
Copy
public void WriteString(string b)
Parameters
Type Name Description
String b

string data.

API Level: 5

Extension Methods