Class ProxyBase
Definition
- Namespace:
- Tizen.Applications.RPCPort
- Assembly:
- Tizen.Applications.Common.dll
Base class for creating a proxy class for remote procedure calls.
C#Copypublic abstract class ProxyBase : IDisposable
- Inheritance
-
objectProxyBase
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copypublic ProxyBase()
Exceptions
Type | Condition |
---|---|
InvalidIOException | Thrown when an internal I/O error occurs during initialization. |
Properties
Declaration
C#Copyprotected Port CallbackPort { get; }
Property Value
Type | Description |
---|---|
Port |
Declaration
C#Copyprotected Port Port { get; }
Property Value
Type | Description |
---|---|
Port |
Methods
Connect(string, string)
Establishes a connection to the specified application through the named remote procedure call (RPC) port.
Declaration
C#Copyprotected void Connect(string appid, string port)
Parameters
Type | Name | Description |
---|---|---|
string | appid | The ID of the target application to connect to. |
string | port | The name of the RPC port to use for the connection. |
Remarks
By calling this method, you can establish a connection between two applications using the specified RPC port. It requires the target application ID and the name of the desired RPC port. If the connection cannot be established due to invalid arguments or insufficient privileges, appropriate exceptions are thrown accordingly.
Exceptions
Type | Condition |
---|---|
InvalidIDException | Thrown if the specified application ID does not exist. |
InvalidIOException | Thrown in case of an internal input/output error during the connection process. |
PermissionDeniedException | Thrown when the required privileges are missing or access is otherwise restricted. |
ConnectSync(string, string)
Establishes a connection to the specified application synchronously through the named remote procedure call (RPC) port.
Declaration
C#Copyprotected void ConnectSync(string appid, string port)
Parameters
Type | Name | Description |
---|---|---|
string | appid | The ID of the target application to connect to. |
string | port | The name of the RPC port to use for the connection. |
Exceptions
Type | Condition |
---|---|
InvalidIDException | Thrown if the specified application ID does not exist. |
InvalidIOException | Thrown in case of an internal input/output error during the connection process. |
PermissionDeniedException | Thrown when the required privileges are missing or access is otherwise restricted. |
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 ~ProxyBase()
Declaration
C#Copyprotected Port GetPort(Port.Type t)
Parameters
Type | Name | Description |
---|---|---|
Port.Type | t | The specific type of port to retrieve. |
Returns
Type | Description |
---|---|
Port | An object representing the requested port. |
Examples
To get a main port:
CopyPort mainPort = GetPort(Port.Type.Main);
Exceptions
Type | Condition |
---|---|
InvalidIOException | Thrown if an internal I/O error occurs while retrieving the port. |
Declaration
C#Copyprotected abstract void OnConnectedEvent(string endPoint, string portName, Port port)
Parameters
Type | Name | Description |
---|---|---|
string | endPoint | The target stub application ID. |
string | portName | The name of the Remote Procedure Call (RPC) port. |
Port | port | Port object for reading and writing. |
Declaration
C#Copyprotected abstract void OnDisconnectedEvent(string endPoint, string portName)
Parameters
Type | Name | Description |
---|---|---|
string | endPoint | The target stub application ID.. |
string | portName | The name of the Remote Procedure Call (RPC) port. |
OnReceivedEvent(string, string)
Abstract method called when the proxy receives data from stub.
Declaration
C#Copyprotected abstract void OnReceivedEvent(string endPoint, string portName)
Parameters
Type | Name | Description |
---|---|---|
string | endPoint | The target stub application ID.. |
string | portName | The name of the Remote Procedure Call (RPC) port. |
Declaration
C#Copyprotected abstract void OnRejectedEvent(string endPoint, string portName)
Parameters
Type | Name | Description |
---|---|---|
string | endPoint | The target stub application ID.. |
string | portName | The name of the Remote Procedure Call (RPC) port. |