From 61d88971bfa9348ba77a562c3f813974448dde59 Mon Sep 17 00:00:00 2001 From: Atul Rai Date: Tue, 10 Oct 2017 15:37:52 +0530 Subject: [PATCH] Fix Build warning for Tizen.Netwrok.Bluetooth Change-Id: I4b8748daee7ecebfbc9cb7400f24b34614fb8e54 Signed-off-by: Atul Rai --- .../Tizen.Network.Bluetooth/BluetoothAdapter.cs | 2 +- .../Tizen.Network.Bluetooth/BluetoothAudio.cs | 4 ++-- .../Tizen.Network.Bluetooth/BluetoothAvrcp.cs | 2 +- .../Tizen.Network.Bluetooth/BluetoothDevice.cs | 2 +- .../Tizen.Network.Bluetooth/BluetoothEventArgs.cs | 3 +++ .../Tizen.Network.Bluetooth/BluetoothGatt.cs | 10 ++++++++- .../Tizen.Network.Bluetooth/BluetoothLeAdapter.cs | 9 ++++++++ .../Tizen.Network.Bluetooth/BluetoothOpp.cs | 3 +++ .../Tizen.Network.Bluetooth/BluetoothProfile.cs | 2 +- .../BluetoothServerSocket.cs | 6 +++++ .../Tizen.Network.Bluetooth/BluetoothSocket.cs | 26 ++++++++++++++++++++++ .../Tizen.Network.Bluetooth/BluetoothStructs.cs | 1 - 12 files changed, 62 insertions(+), 8 deletions(-) diff --git a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAdapter.cs b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAdapter.cs index 667dc78..8566810 100644 --- a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAdapter.cs +++ b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAdapter.cs @@ -20,7 +20,7 @@ using System.Collections.Generic; namespace Tizen.Network.Bluetooth { /// - /// This class is used to control the Bluetooth adapter and get the list of bonded devices.
+ /// This class is used to control the Bluetooth adapter and get the list of bonded devices.
/// The BluetoothAdapter class is used to discover neighbouring bluetooth devices. ///
/// http://tizen.org/privilege/bluetooth diff --git a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAudio.cs b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAudio.cs index 5b4a1c8..640ff7b 100644 --- a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAudio.cs +++ b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAudio.cs @@ -49,7 +49,7 @@ namespace Tizen.Network.Bluetooth /// /// /// The device must be bonded with the remote device by CreateBond(). If connection request succeeds, the AudioConnectionStateChanged event will be invoked. - /// If audio profile type is All and this request succeeds, then the AudioConnectionStateChanged event will be called twice when HspHfp
+ /// If audio profile type is All and this request succeeds, then the AudioConnectionStateChanged event will be called twice when HspHfp
/// and AdvancedAudioDistribution is connected. ///
/// The type of the audio profile. @@ -78,7 +78,7 @@ namespace Tizen.Network.Bluetooth /// /// /// The device must be connected by Connect(). If the disconnection request succeeds, the AudioConnectionStateChanged event will be invoked. - /// If audio profile type is All and this request succeeds, then the AudioConnectionStateChanged event will be called twice when HspHfp
+ /// If audio profile type is All and this request succeeds, then the AudioConnectionStateChanged event will be called twice when HspHfp
/// and AdvancedAudioDistribution is disconnected. ///
/// The type of the audio profile. diff --git a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAvrcp.cs b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAvrcp.cs index 169cb16..09ae692 100644 --- a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAvrcp.cs +++ b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAvrcp.cs @@ -134,7 +134,7 @@ namespace Tizen.Network.Bluetooth /// The repeat mode. /// Thrown when the Bluetooth is not supported. /// Thrown when the Bluetooth is not enabled - /// or when notifying the repeat mode state to the remote device fails. + /// or when notifying the repeat mode state to the remote device fails. /// public void NotifyRepeatMode(RepeatMode mode) { diff --git a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothDevice.cs b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothDevice.cs index 33adb66..75c4c40 100644 --- a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothDevice.cs +++ b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothDevice.cs @@ -24,7 +24,7 @@ using System.Collections.Specialized; namespace Tizen.Network.Bluetooth { /// - /// This class is used to handle the connection with other devices and set authorization of other devices.
+ /// This class is used to handle the connection with other devices and set authorization of other devices.
/// The BluetoothDevice class is used to search for services available on remote devices. ///
/// http://tizen.org/privilege/bluetooth diff --git a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothEventArgs.cs b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothEventArgs.cs index c1a979b..df91d91 100644 --- a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothEventArgs.cs +++ b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothEventArgs.cs @@ -457,6 +457,9 @@ namespace Tizen.Network.Bluetooth } } + /// + /// The AcceptStateChanged event is raised when the socket connection state is changed. + /// public class AcceptStateChangedEventArgs : EventArgs { private BluetoothError _result; diff --git a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothGatt.cs b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothGatt.cs index 25328d7..aa2077a 100644 --- a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothGatt.cs +++ b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothGatt.cs @@ -209,6 +209,9 @@ namespace Tizen.Network.Bluetooth return client.Isvalid() ? client : null; } + /// + /// Destroy Bluetooth GATT client + /// public void DestroyClient() { _impl.GetHandle().Dispose(); @@ -503,7 +506,7 @@ namespace Tizen.Network.Bluetooth /// /// The constructor. /// - /// The UUID of the characterstic.param> + /// The UUID of the characterstic. /// Permissions for the characterstic. /// Properties set for the characterstic. /// The value associated with the characterstic. @@ -789,6 +792,11 @@ namespace Tizen.Network.Bluetooth private EventHandler _readValueRequested; private EventHandler _writeValueRequested; + /// + /// The constructor. + /// + /// The UUID of the GATT attribute. + /// Permission for the GATT attribute. public BluetoothGattAttribute(string uuid, BluetoothGattPermission permission) { Uuid = uuid; diff --git a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothLeAdapter.cs b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothLeAdapter.cs index 3034d6c..30183d2 100644 --- a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothLeAdapter.cs +++ b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothLeAdapter.cs @@ -165,6 +165,9 @@ namespace Tizen.Network.Bluetooth { } } + /// + /// BluetoothLeDevice destructor. + /// ~BluetoothLeDevice() { if (BluetoothAdapter.IsBluetoothEnabled && Globals.IsInitialize) @@ -483,6 +486,9 @@ namespace Tizen.Network.Bluetooth { } } + /// + /// BluetoothLeAdvertiseData destructor. + /// ~BluetoothLeAdvertiseData() { if (BluetoothAdapter.IsBluetoothEnabled && Globals.IsInitialize) @@ -558,6 +564,9 @@ namespace Tizen.Network.Bluetooth { } } + /// + /// Dispose + /// public void Dispose() { Dispose(true); diff --git a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothOpp.cs b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothOpp.cs index 30d649e..4723987 100644 --- a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothOpp.cs +++ b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothOpp.cs @@ -28,6 +28,9 @@ namespace Tizen.Network.Bluetooth private static BluetoothOppServerImpl _impl; private static BluetoothOppServer _instance; + /// + /// The constructor + /// public BluetoothOppServer() { _impl = BluetoothOppServerImpl.Instance; diff --git a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothProfile.cs b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothProfile.cs index 6be950a..c7cfad2 100644 --- a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothProfile.cs +++ b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothProfile.cs @@ -17,7 +17,7 @@ namespace Tizen.Network.Bluetooth { /// - /// This generic class represents all Bluetooth profiles.
+ /// This generic class represents all Bluetooth profiles.
/// Any common properties/functions can be added in this class in future. ///
/// http://tizen.org/privilege/bluetooth diff --git a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothServerSocket.cs b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothServerSocket.cs index e84193f..d2390f9 100644 --- a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothServerSocket.cs +++ b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothServerSocket.cs @@ -112,11 +112,17 @@ namespace Tizen.Network.Bluetooth } } + /// + /// BluetoothServerSocket distructor. + /// ~BluetoothServerSocket() { Dispose(false); } + /// + /// Dispose + /// public void Dispose() { Dispose(true); diff --git a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothSocket.cs b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothSocket.cs index 14cc730..c5198cb 100644 --- a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothSocket.cs +++ b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothSocket.cs @@ -25,8 +25,27 @@ namespace Tizen.Network.Bluetooth /// public interface IBluetoothServerSocket { + /// + /// Event handler to receive data over bluetooth socket. + /// This event occurs when the socket server receives data from the client. + /// event EventHandler DataReceived; + + /// + /// Event handler method to receive bluetooth socket connection state changed events. + /// This event occurs when the connection state between two devices is changed. + /// event EventHandler ConnectionStateChanged; + + /// + /// Method to send data over bluetooth socket + /// + /// The number of bytes written (zero indicates nothing was written). + /// + /// The connection must be established. + /// + /// The data to be sent. + /// int SendData(string data); } @@ -35,7 +54,14 @@ namespace Tizen.Network.Bluetooth /// public interface IBluetoothClientSocket : IBluetoothServerSocket { + /// + /// Connect client socket to server socket on remote device. + /// void Connect(); + + /// + /// Disconnect client socket from server socket. + /// void Disconnect(); } diff --git a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothStructs.cs b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothStructs.cs index 754cba1..44475aa 100644 --- a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothStructs.cs +++ b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothStructs.cs @@ -170,7 +170,6 @@ namespace Tizen.Network.Bluetooth internal string ServiceUuid; } - /// [StructLayout(LayoutKind.Sequential)] internal struct BluetoothLeScanDataStruct { -- 2.7.4