Class StubBase
Definition
- Namespace:
- Tizen.Applications.RPCPort
- Assembly:
- Tizen.Applications.Common.dll
Abstract class for creating a stub class for RPC.
C#Copypublic abstract class StubBase : IDisposable
- Inheritance
-
objectStubBase
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copypublic StubBase(string portName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | portName | The name of the port that wants to listen. |
Exceptions
| Type | Condition |
|---|---|
| InvalidIOException | Thrown when an internal IO error occurs. |
Properties
Declaration
C#Copypublic string PortName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Declaration
C#Copyprotected void AddPrivilege(string privilege)
Parameters
| Type | Name | Description |
|---|---|---|
| string | privilege | The privilege to access this stub. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when the privilege is null. |
Declaration
C#Copypublic void Dispose()
Dispose(bool)
Releases any unmanaged resources used by this object and disposes any other disposable objects.
Declaration
C#Copyprotected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | true to disposes any disposable objects, or false not to dispose disposable objects. |
Declaration
C#Copyprotected ~StubBase()
Declaration
C#Copyprotected Port GetPort(Port.Type t, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| Port.Type | t | The type of port. |
| 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. |
Declaration
C#Copyprotected void Listen()
Exceptions
| Type | Condition |
|---|---|
| InvalidIOException | Thrown when an internal IO error occurs. |
Declaration
C#Copyprotected abstract void OnConnectedEvent(string sender, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sender | The target proxy app ID. |
| string | instance | The information about the request. |
Declaration
C#Copyprotected abstract void OnDisconnectedEvent(string sender, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sender | The target proxy app ID. |
| string | instance | The information about the request. |
OnReceivedEvent(string, string, Port)
Abstract method called when the stub receives data from proxy.
Declaration
C#Copyprotected abstract bool OnReceivedEvent(string sender, string instance, Port port)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sender | The target proxy app ID. |
| string | instance | The information about the request. |
| Port | port | Port object for reading and writing. |
Returns
| Type | Description |
|---|---|
| bool |
|
Declaration
C#Copyprotected abstract void OnTerminatedEvent()
Declaration
C#Copyprotected void SetTrusted(bool trusted)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | trusted | Whether stub allows only trusted proxy or not. |