Class BluetoothOppServer
Definition
- Namespace:
- Tizen.Network.Bluetooth
- Assembly:
- Tizen.Network.Bluetooth.dll
- API Level:
- 4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/bluetooth
A class which is used to handle the connection and send and receive the object over Opp profile.
public class BluetoothOppServer
- Inheritance
-
BluetoothOppServer
Constructors
View SourceBluetoothOppServer()
The constructor
Declaration
public BluetoothOppServer()
API Level: 4
Methods
View SourceAcceptPush(String)
Accept File Push request.
Declaration
public int AcceptPush(string FileName)
Parameters
Type | Name | Description |
---|---|---|
String | FileName | File name to accept. |
Returns
Type | Description |
---|---|
Int32 | The id of transfer. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when the required feature is not Supported. |
NotSupportedException | Thrown when the BT/BTLE is not Supported. |
InvalidOperationException | Thrown when the BT/BTLE is not Enabled or Other Bluetooth Errors. |
API Level: 4
Feature: http://tizen.org/feature/network.bluetooth.opp
View SourceCancelTransfer(Int32)
Cancel the ongoing transfer session.
Declaration
public void CancelTransfer(int TransferId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | TransferId | tranfer ID. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when the required feature is not Supported. |
NotSupportedException | Thrown when the BT/BTLE is not Supported. |
InvalidOperationException | Thrown when the BT/BTLE is not Enabled or Other Bluetooth Errors. |
API Level: 4
Feature: http://tizen.org/feature/network.bluetooth.opp
View SourceRejectPush()
Reject File Push request.
Declaration
public void RejectPush()
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when the required feature is not Supported. |
NotSupportedException | Thrown when the BT/BTLE is not Supported. |
InvalidOperationException | Thrown when the BT/BTLE is not Enabled or Other Bluetooth Errors. |
API Level: 4
Feature: http://tizen.org/feature/network.bluetooth.opp
View SourceSetDestinationPath(String)
Cancel the ongoing transfer session.
Declaration
public void SetDestinationPath(string FilePath)
Parameters
Type | Name | Description |
---|---|---|
String | FilePath | Path to store the files. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when the required feature is not Supported. |
NotSupportedException | Thrown when the BT/BTLE is not Supported. |
InvalidOperationException | Thrown when the BT/BTLE is not Enabled or Other Bluetooth Errors. |
API Level: 4
Feature: http://tizen.org/feature/network.bluetooth.opp
View SourceStartServer(String)
Register the Opp Server with the Opp service.
Declaration
public static BluetoothOppServer StartServer(string FilePath)
Parameters
Type | Name | Description |
---|---|---|
String | FilePath | Path to store the files. |
Returns
Type | Description |
---|---|
BluetoothOppServer | 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 |
---|---|
NotSupportedException | Thrown when the required feature is not Supported. |
NotSupportedException | Thrown when the BT/BTLE is not Supported. |
InvalidOperationException | Thrown when the BT/BTLE is not Enabled or Other Bluetooth Errors. |
API Level: 4
Feature: http://tizen.org/feature/network.bluetooth.opp
View SourceStopServer()
Stops the Opp Server.
Declaration
public void StopServer()
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when the required feature is not Supported. |
NotSupportedException | Thrown when the BT/BTLE is not Supported. |
InvalidOperationException | Thrown when the BT/BTLE is not Enabled or Other Bluetooth Errors. |
API Level: 4
Feature: http://tizen.org/feature/network.bluetooth.opp
Events
View SourceConnectionRequested
(event) ConnectionRequested is called when OPP client requests for connection.
Declaration
public event EventHandler<ConnectionRequestedEventArgs> ConnectionRequested
Event Type
Type | Description |
---|---|
EventHandler<ConnectionRequestedEventArgs> |
API Level: 4
View SourceTransferFinished
(event) TransferFinished is called when the file tranfser is completed.
Declaration
public event EventHandler<TransferFinishedEventArgs> TransferFinished
Event Type
Type | Description |
---|---|
EventHandler<TransferFinishedEventArgs> |
API Level: 4
View SourceTransferProgress
(event) TransferProgress is called when the file transfer state is changed.
Declaration
public event EventHandler<TransferProgressEventArgs> TransferProgress
Event Type
Type | Description |
---|---|
EventHandler<TransferProgressEventArgs> |