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.

C#
Copy
public class BluetoothOppServer
Inheritance
System.Object
BluetoothOppServer

Constructors

View Source

BluetoothOppServer()

The constructor

Declaration
C#
Copy
public BluetoothOppServer()
API Level: 4

Methods

View Source

AcceptPush(String)

Accept File Push request.

Declaration
C#
Copy
public int AcceptPush(string FileName)
Parameters
Type Name Description
System.String FileName

File name to accept.

Returns
Type Description
System.Int32

The id of transfer.

Exceptions
Type Condition
System.NotSupportedException

Thrown when the required feature is not Supported.

System.NotSupportedException

Thrown when the BT/BTLE is not Supported.

System.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 Source

CancelTransfer(Int32)

Cancel the ongoing transfer session.

Declaration
C#
Copy
public void CancelTransfer(int TransferId)
Parameters
Type Name Description
System.Int32 TransferId

tranfer ID.

Exceptions
Type Condition
System.NotSupportedException

Thrown when the required feature is not Supported.

System.NotSupportedException

Thrown when the BT/BTLE is not Supported.

System.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 Source

RejectPush()

Reject File Push request.

Declaration
C#
Copy
public void RejectPush()
Exceptions
Type Condition
System.NotSupportedException

Thrown when the required feature is not Supported.

System.NotSupportedException

Thrown when the BT/BTLE is not Supported.

System.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 Source

SetDestinationPath(String)

Cancel the ongoing transfer session.

Declaration
C#
Copy
public void SetDestinationPath(string FilePath)
Parameters
Type Name Description
System.String FilePath

Path to store the files.

Exceptions
Type Condition
System.NotSupportedException

Thrown when the required feature is not Supported.

System.NotSupportedException

Thrown when the BT/BTLE is not Supported.

System.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 Source

StartServer(String)

Register the Opp Server with the Opp service.

Declaration
C#
Copy
public static BluetoothOppServer StartServer(string FilePath)
Parameters
Type Name Description
System.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
System.NotSupportedException

Thrown when the required feature is not Supported.

System.NotSupportedException

Thrown when the BT/BTLE is not Supported.

System.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 Source

StopServer()

Stops the Opp Server.

Declaration
C#
Copy
public void StopServer()
Exceptions
Type Condition
System.NotSupportedException

Thrown when the required feature is not Supported.

System.NotSupportedException

Thrown when the BT/BTLE is not Supported.

System.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 Source

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<ConnectionRequestedEventArgs>
API Level: 4
View Source

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<TransferFinishedEventArgs>
API Level: 4
View Source

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<TransferProgressEventArgs>
API Level: 4