Class StubBase

Definition

Namespace:
Tizen.Applications.RPCPort
Assembly:
Tizen.Applications.Common.dll
API Level:
5

Abstract class for creating a stub class for RPC.

C#
Copy
public abstract class StubBase : IDisposable
Inheritance
System.Object
StubBase
Implements
System.IDisposable

Constructors

View Source

StubBase(String)

Constructor for this class.

Declaration
C#
Copy
public StubBase(string portName)
Parameters
Type Name Description
System.String portName

The name of the port that wants to listen.

Exceptions
Type Condition
InvalidIOException

Thrown when an internal IO error occurs.

API Level: 5

Properties

View Source

PortName

Gets port name.

Declaration
C#
Copy
public string PortName { get; }
Property Value
Type Description
System.String
API Level: 5

Methods

View Source

AddPrivilege(String)

Adds a privilege to the stub.

Declaration
C#
Copy
protected void AddPrivilege(string privilege)
Parameters
Type Name Description
System.String privilege

The privilege to access this stub.

Exceptions
Type Condition
System.ArgumentNullException

Thrown when the privilege is null.

API Level: 5
View Source

Dispose()

Release all the resources used by the class StubBase.

Declaration
C#
Copy
public void Dispose()
View Source

Dispose(Boolean)

Releases any unmanaged resources used by this object and disposes any other disposable objects.

Declaration
C#
Copy
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
Boolean disposing

true to disposes any disposable objects, or false not to dispose disposable objects.

API Level: 6
View Source

Finalize()

Finalizer of the class StubBase.

Declaration
C#
Copy
protected void Finalize()
View Source

GetPort(Port.Type, String)

Gets s port.

Declaration
C#
Copy
protected Port GetPort(Port.Type t, string instance)
Parameters
Type Name Description
Port.Type t

The type of port.

System.String instance

The ID of the instance, which is connected.

Returns
Type Description
Port

Port object.

Exceptions
Type Condition
InvalidIDException

Thrown when invalid instance is used.

InvalidIOException

Thrown when an internal IO error occurs.

API Level: 5
View Source

Listen()

Listens to the requests for connections.

Declaration
C#
Copy
protected void Listen()
Exceptions
Type Condition
InvalidIOException

Thrown when an internal IO error occurs.

API Level: 5
View Source

OnConnectedEvent(String, String)

Abstract method for receiving connected event.

Declaration
C#
Copy
protected abstract void OnConnectedEvent(string sender, string instance)
Parameters
Type Name Description
System.String sender

The target proxy app ID.

System.String instance

The information about the request.

API Level: 5
View Source

OnDisconnectedEvent(String, String)

Abstract method for receiving disconnected event.

Declaration
C#
Copy
protected abstract void OnDisconnectedEvent(string sender, string instance)
Parameters
Type Name Description
System.String sender

The target proxy app ID.

System.String instance

The information about the request.

API Level: 5
View Source

OnReceivedEvent(String, String, Port)

Abstract method called when the stub receives data from proxy.

Declaration
C#
Copy
protected abstract bool OnReceivedEvent(string sender, string instance, Port port)
Parameters
Type Name Description
System.String sender

The target proxy app ID.

System.String instance

The information about the request.

Port port

Port object for reading and writing.

Returns
Type Description
Boolean

true to continue receiving data, otherwise false to disconnect from the port.

API Level: 5
View Source

OnTerminatedEvent()

Abstract method called immediately before disposing an object.

Declaration
C#
Copy
protected abstract void OnTerminatedEvent()
API Level: 5
View Source

SetTrusted(Boolean)

Sets a trusted proxy to the stub.

Declaration
C#
Copy
protected void SetTrusted(bool trusted)
Parameters
Type Name Description
Boolean trusted

Whether stub allows only trusted proxy or not.

API Level: 5

Implements

System.IDisposable