Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tizen.Network.Nfc] Enhance API descriptions #6368

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 24 additions & 12 deletions src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcManager.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@
namespace Tizen.Network.Nfc
{
/// <summary>
/// A class for the NFC management. It allows applications to use the NFC service.
/// The NfcManager class provides methods for managing the NFC service in Tizen applications.
/// It allows applications to initialize and terminate the NFC service, register and unregister NFC tags, and handle NFC events.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <privilege>http://tizen.org/privilege/nfc</privilege>
static public class NfcManager
{
/// <summary>
/// Checks whether the NFC is supported.
/// The IsSupported property checks whether the NFC feature is supported on the device.
/// It returns a boolean value indicating whether the NFC service is available.
/// </summary>
/// <since_tizen> 3 </since_tizen>
static public bool IsSupported
Expand Down Expand Up @@ -57,7 +59,8 @@ static public bool IsSupported
}

/// <summary>
/// The NFC Activation state.
/// The IsActivated property checks whether the NFC service is currently activated on the device.
/// It returns a boolean value indicating whether the NFC service is active.
/// </summary>
/// <since_tizen> 3 </since_tizen>
static public bool IsActivated
Expand Down Expand Up @@ -85,7 +88,8 @@ static public bool IsActivated
}

/// <summary>
/// The Tag Filter type.
/// The TagFilterType property specifies the type of tag filtering to be used by the NFC service.
/// It can be set to either NfcTagFilterType.All or NfcTagFilterType.NdefOnly, depending on the desired behavior.
/// </summary>
/// <since_tizen> 3 </since_tizen>
static public NfcTagFilterType TagFilterType
Expand Down Expand Up @@ -137,7 +141,8 @@ static public NfcTagFilterType TagFilterType
}

/// <summary>
/// The Secure Element type.
/// The SecureElementType property specifies the type of Secure Element (SE) to be used by the NFC service.
/// It can be set to either NfcSecureElementType.Uicc or NfcSecureElementType.Ese, depending on the desired behavior.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <privilege>http://tizen.org/privilege/nfc.cardemulation</privilege>
Expand Down Expand Up @@ -239,7 +244,7 @@ static public bool SystemHandlerEnabled
}

/// <summary>
/// The cached NDEF message.
/// The CachedNdefMessage property returns the cached NDEF message, which is a representation of the data stored on an NFC tag.
/// </summary>
/// <since_tizen> 3 </since_tizen>
static public NfcNdefMessage CachedNdefMessage
Expand Down Expand Up @@ -267,7 +272,8 @@ static public NfcNdefMessage CachedNdefMessage
}

/// <summary>
/// Gets the Tag adapter object.
/// The GetTagAdapter method returns the Tag adapter object, which is used to manage NFC tags in the NFC service.
/// The Tag adapter provides methods for reading, writing, and formatting NFC tags.
/// </summary>
/// <since_tizen> 3 </since_tizen>
static public NfcTagAdapter GetTagAdapter()
Expand All @@ -294,7 +300,9 @@ static public NfcTagAdapter GetTagAdapter()
}

/// <summary>
/// Gets the P2P adapter object.
/// The GetP2pAdapter method returns the P2P adapter object,
/// which is used to manage NFC peer-to-peer (P2P) communication in the NFC service.
/// The P2P adapter provides methods for initiating and receiving P2P communication.
/// </summary>
/// <since_tizen> 3 </since_tizen>
static public NfcP2pAdapter GetP2pAdapter()
Expand All @@ -321,7 +329,9 @@ static public NfcP2pAdapter GetP2pAdapter()
}

/// <summary>
/// Gets the Card Emulation adapter object.
/// The GetCardEmulationAdapter method returns the Card Emulation adapter object,
/// which is used to manage NFC card emulation in the NFC service.
/// The Card Emulation adapter provides methods for registering and deregistering services, and for handling card emulation events.
/// </summary>
/// <since_tizen> 3 </since_tizen>
static public NfcCardEmulationAdapter GetCardEmulationAdapter()
Expand All @@ -348,7 +358,7 @@ static public NfcCardEmulationAdapter GetCardEmulationAdapter()
}

/// <summary>
/// Activates the NFC asynchronously.
/// The SetActivationAsync method activates or deactivates the NFC service asynchronously.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>A task indicates whether the Activate method is done or not.</returns>
Expand All @@ -375,7 +385,8 @@ static public Task SetActivationAsync(bool activation)
}

/// <summary>
/// The Activation changed event.
/// The ActivationChanged event is triggered when the NFC activation state changes.
/// The event handler receives an ActivationChangedEventArgs object containing information about the activation state change.
/// </summary>
/// <since_tizen> 3 </since_tizen>
static public event EventHandler<ActivationChangedEventArgs> ActivationChanged
Expand Down Expand Up @@ -423,7 +434,8 @@ static public event EventHandler<ActivationChangedEventArgs> ActivationChanged
}

/// <summary>
/// The NDEF discovered event.
/// The NdefMessageDiscovered event is triggered when an NDEF message is discovered by the NFC service.
/// The event handler receives an NdefMessageDiscoveredEventArgs object containing information about the discovered NDEF message.
/// </summary>
/// <since_tizen> 3 </since_tizen>
static public event EventHandler<NdefMessageDiscoveredEventArgs> NdefMessageDiscovered
Expand Down
12 changes: 8 additions & 4 deletions src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcP2p.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
namespace Tizen.Network.Nfc
{
/// <summary>
/// The class for managing the P2P target information.
/// The NfcP2p class provides methods for managing the P2P target information.
/// It allows applications to send and receive P2P messages, and to handle P2P connection events.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public class NfcP2p : IDisposable
Expand All @@ -35,7 +36,9 @@ public class NfcP2p : IDisposable
private Interop.Nfc.P2pDataReceivedCallback _p2pDataReceivedCallback;

/// <summary>
/// The event for receiving data from the NFC peer-to-peer target.
/// The P2pDataReceived event is triggered when data is received from an NFC peer-to-peer target.
/// The event handler receives a P2pDataReceivedEventArgs object containing the received data.
/// This event is typically used in conjunction with the NfcP2pAdapter class to handle incoming P2P messages.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public event EventHandler<P2pDataReceivedEventArgs> P2pDataReceived
Expand Down Expand Up @@ -94,7 +97,7 @@ internal IntPtr GetHandle()
}

/// <summary>
/// Sends data to the NFC peer-to-peer target.
/// The SendNdefMessageAsync method sends an NDEF message to an NFC peer-to-peer target.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <param name="ndefMessage">The NfcNdefMessage object.</param>
Expand Down Expand Up @@ -144,7 +147,8 @@ private void UnregisterP2pDataReceivedEvent()
}

/// <summary>
/// The class for managing the SNEP (Simple NDEF Exchange Protocol) information.
/// The NfcSnep class provides methods for managing SNEP (Simple NDEF Exchange Protocol) information.
/// It allows applications to send and receive SNEP messages, and to handle SNEP connection events.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public class NfcSnep : IDisposable
Expand Down
6 changes: 4 additions & 2 deletions src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcP2pAdapter.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
namespace Tizen.Network.Nfc
{
/// <summary>
/// The class for the NFC P2P (Peer-to-Peer) mode. It allows applications to handle P2P informations.
/// The NfcP2pAdapter class provides methods for managing NFC peer-to-peer (P2P) communication.
/// It allows applications to initiate and receive P2P communication,
/// and to handle P2P information such as messages and connections.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <privilege>http://tizen.org/privilege/nfc</privilege>
Expand Down Expand Up @@ -88,7 +90,7 @@ private void Dispose(bool disposing)
}

/// <summary>
/// Gets the current connected P2P target.
/// The GetConnectedTarget method returns the currently connected P2P target.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>The NfcP2p object.</returns>
Expand Down
4 changes: 3 additions & 1 deletion src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcTag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
namespace Tizen.Network.Nfc
{
/// <summary>
/// The class for managing the Tag information.
/// The NfcTag class provides methods for managing tag information.
/// It allows applications to read and write tag information, and to handle tag events such as detection and removal.
/// This class is typically used in conjunction with the NfcManager class to manage tag communication.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public class NfcTag : IDisposable
Expand Down
Loading