Class BluetoothOppServer
Definition
- Assembly:
- Tizen.Network.Bluetooth.dll
A class which is used to handle the connection and send and receive the object over Opp profile.
C#
Copy
public class BluetoothOppServer
- Inheritance
-
objectBluetooth
Opp Server
Constructors
Declaration
C#
Copy
public BluetoothOppServer()
Methods
Declaration
C#
Copy
public int AcceptPush(string FileName)
Parameters
Type | Name | Description |
---|---|---|
string | FileName | File name to accept. |
Returns
Type | Description |
---|---|
int | The id of transfer. |
Exceptions
Type | Condition |
---|---|
System. |
Thrown when the required feature is not Supported. |
System. |
Thrown when the BT/BTLE is not Supported. |
System. |
Thrown when the BT/BTLE is not Enabled or Other Bluetooth Errors. |
Declaration
C#
Copy
public void CancelTransfer(int TransferId)
Parameters
Type | Name | Description |
---|---|---|
int | TransferId | tranfer ID. |
Exceptions
Type | Condition |
---|---|
System. |
Thrown when the required feature is not Supported. |
System. |
Thrown when the BT/BTLE is not Supported. |
System. |
Thrown when the BT/BTLE is not Enabled or Other Bluetooth Errors. |
Declaration
C#
Copy
public void RejectPush()
Exceptions
Type | Condition |
---|---|
System. |
Thrown when the required feature is not Supported. |
System. |
Thrown when the BT/BTLE is not Supported. |
System. |
Thrown when the BT/BTLE is not Enabled or Other Bluetooth Errors. |
Declaration
C#
Copy
public void SetDestinationPath(string FilePath)
Parameters
Type | Name | Description |
---|---|---|
string | FilePath | Path to store the files. |
Exceptions
Type | Condition |
---|---|
System. |
Thrown when the required feature is not Supported. |
System. |
Thrown when the BT/BTLE is not Supported. |
System. |
Thrown when the BT/BTLE is not Enabled or Other Bluetooth Errors. |
Declaration
C#
Copy
public static BluetoothOppServer StartServer(string FilePath)
Parameters
Type | Name | Description |
---|---|---|
string | FilePath | Path to store the files. |
Returns
Type | Description |
---|---|
Bluetooth |
The BluetoothOppServer instance. |
Remarks
The device must be bonded with remote device by CreateBond(). If connection request is received from OPP Client, ConnectionRequested event will be invoked.
Exceptions
Type | Condition |
---|---|
System. |
Thrown when the required feature is not Supported. |
System. |
Thrown when the BT/BTLE is not Supported. |
System. |
Thrown when the BT/BTLE is not Enabled or Other Bluetooth Errors. |
Declaration
C#
Copy
public void StopServer()
Exceptions
Type | Condition |
---|---|
System. |
Thrown when the required feature is not Supported. |
System. |
Thrown when the BT/BTLE is not Supported. |
System. |
Thrown when the BT/BTLE is not Enabled or Other Bluetooth Errors. |
Events
ConnectionRequested
(event) ConnectionRequested is called when OPP client requests for connection.
Declaration
C#
Copy
public event EventHandler<ConnectionRequestedEventArgs> ConnectionRequested
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><Connection |
TransferFinished
(event) TransferFinished is called when the file tranfser is completed.
Declaration
C#
Copy
public event EventHandler<TransferFinishedEventArgs> TransferFinished
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><Transfer |
TransferProgress
(event) TransferProgress is called when the file transfer state is changed.
Declaration
C#
Copy
public event EventHandler<TransferProgressEventArgs> TransferProgress
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><Transfer |