summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Jiung <jiung.yu@samsung.com>2017-02-27 05:18:04 (GMT)
committerYu Jiung <jiung.yu@samsung.com>2017-03-03 04:17:20 (GMT)
commita2cdb000a33d7cb2a6de4f090974f89fa8e5e420 (patch)
tree5f6300d4aeeb11d092a51705c9edfe8188648353
parent86c573af3017e275c575f147d8e5f97c50367ad7 (diff)
downloadwifi-direct-a2cdb000a33d7cb2a6de4f090974f89fa8e5e420.zip
wifi-direct-a2cdb000a33d7cb2a6de4f090974f89fa8e5e420.tar.gz
wifi-direct-a2cdb000a33d7cb2a6de4f090974f89fa8e5e420.tar.bz2
Change-Id: I6268fa2026f0acede4c5dcd48cb3ac31a97e9cc3 Signed-off-by: Yu jiung <jiung.yu@samsung.com>
-rw-r--r--Tizen.Network.WiFiDirect/Interop/Interop.WiFiDirect.cs2
-rw-r--r--Tizen.Network.WiFiDirect/Tizen.Network.WiFiDirect/WiFiDirectData.cs4
-rw-r--r--Tizen.Network.WiFiDirect/Tizen.Network.WiFiDirect/WiFiDirectPeer.cs42
-rw-r--r--packaging/csapi-network-wifi-direct.spec2
4 files changed, 33 insertions, 17 deletions
diff --git a/Tizen.Network.WiFiDirect/Interop/Interop.WiFiDirect.cs b/Tizen.Network.WiFiDirect/Interop/Interop.WiFiDirect.cs
index ac9afc1..3f68798 100644
--- a/Tizen.Network.WiFiDirect/Interop/Interop.WiFiDirect.cs
+++ b/Tizen.Network.WiFiDirect/Interop/Interop.WiFiDirect.cs
@@ -219,6 +219,8 @@ internal static partial class Interop
internal static extern int GetDisplayPort(string address, out int port);
[DllImport(Libraries.WiFiDirect,EntryPoint = "wifi_direct_get_peer_display_throughput")]
internal static extern int GetDisplayThroughput(string address, out int throughput);
+ [DllImport(Libraries.WiFiDirect,EntryPoint = "wifi_direct_get_peer_rssi")]
+ internal static extern int GetRssi(string address, out int rssi);
[DllImport(Libraries.WiFiDirect,EntryPoint = "wifi_direct_get_session_timer")]
internal static extern int GetSessionTimer(out int seconds);
[DllImport(Libraries.WiFiDirect,EntryPoint = "wifi_direct_set_session_timer")]
diff --git a/Tizen.Network.WiFiDirect/Tizen.Network.WiFiDirect/WiFiDirectData.cs b/Tizen.Network.WiFiDirect/Tizen.Network.WiFiDirect/WiFiDirectData.cs
index 10e2862..6112ce4 100644
--- a/Tizen.Network.WiFiDirect/Tizen.Network.WiFiDirect/WiFiDirectData.cs
+++ b/Tizen.Network.WiFiDirect/Tizen.Network.WiFiDirect/WiFiDirectData.cs
@@ -40,9 +40,6 @@ namespace Tizen.Network.WiFiDirect
[MarshalAsAttribute(UnmanagedType.I1)]
internal bool _isGroupOwner;
- [MarshalAsAttribute(UnmanagedType.I1)]
- internal bool _isPersistentGroupOwner;
-
internal WiFiDirectPrimaryDeviceType _primaryType;
internal WiFiDirectSecondaryDeviceType _secondaryType;
@@ -103,7 +100,6 @@ namespace Tizen.Network.WiFiDirect
resultPeer._peerChannel = peer._channel;
resultPeer._isPeerConnected = peer._isConnected;
resultPeer._isPeerGroupOwner = peer._isGroupOwner;
- resultPeer._isPeerPersistentGroupOwner = peer._isPersistentGroupOwner;
resultPeer._peerPrimaryType = peer._primaryType;
resultPeer._peerSecondaryType = peer._secondaryType;
resultPeer._peerWpsTypes = peer._wpsTypes;
diff --git a/Tizen.Network.WiFiDirect/Tizen.Network.WiFiDirect/WiFiDirectPeer.cs b/Tizen.Network.WiFiDirect/Tizen.Network.WiFiDirect/WiFiDirectPeer.cs
index a97e466..aebf2a6 100644
--- a/Tizen.Network.WiFiDirect/Tizen.Network.WiFiDirect/WiFiDirectPeer.cs
+++ b/Tizen.Network.WiFiDirect/Tizen.Network.WiFiDirect/WiFiDirectPeer.cs
@@ -44,7 +44,6 @@ namespace Tizen.Network.WiFiDirect
internal int _peerChannel;
internal bool _isPeerConnected;
internal bool _isPeerGroupOwner;
- internal bool _isPeerPersistentGroupOwner;
internal bool _peerP2PSupport;
internal WiFiDirectPrimaryDeviceType _peerPrimaryType;
internal WiFiDirectSecondaryDeviceType _peerSecondaryType;
@@ -136,17 +135,6 @@ namespace Tizen.Network.WiFiDirect
}
/// <summary>
- /// Persistent group state of the peer device.
- /// </summary>
- public bool IsPersistentGroupOwner
- {
- get
- {
- return _isPeerPersistentGroupOwner;
- }
- }
-
- /// <summary>
/// P2P state of the peer device.
/// </summary>
public bool P2PSupport
@@ -388,6 +376,36 @@ namespace Tizen.Network.WiFiDirect
}
/// <summary>
+ /// WiFi RSSI value of the peer device.
+ /// </summary>
+ /// <remarks>
+ /// Wi-Fi Direct must be activated.
+ /// If there is any error, -1 will be returned.
+ /// </remarks>
+ public int Rssi
+ {
+ get
+ {
+ if (Globals.IsActivated)
+ {
+ int rssi;
+ int ret = Interop.WiFiDirect.GetRssi(_peerMacAddress, out rssi);
+ if (ret != (int)WiFiDirectError.None)
+ {
+ Log.Error(Globals.LogTag, "Failed to get the peer RSSI, Error - " + (WiFiDirectError)ret);
+ return -1;
+ }
+
+ return rssi;
+ }
+
+ else
+ {
+ return -1;
+ }
+ }
+ }
+ /// <summary>
/// (event) ConnectionStateChanged event is raised when the connection state of the peer device changes.
/// </summary>
public event EventHandler<ConnectionStateChangedEventArgs> ConnectionStateChanged
diff --git a/packaging/csapi-network-wifi-direct.spec b/packaging/csapi-network-wifi-direct.spec
index e90996a..7c8dcc3 100644
--- a/packaging/csapi-network-wifi-direct.spec
+++ b/packaging/csapi-network-wifi-direct.spec
@@ -1,6 +1,6 @@
Name: csapi-network-wifi-direct
Summary: Tizen Wi-Fi Direct API for C#
-Version: 1.0.2
+Version: 1.0.3
Release: 1
Group: Development/Libraries
License: Apache-2.0