src/FNetNfc_NdefMessageUtil.cpp
src/FNetNfc_NdefRecordImpl.cpp
src/FNetNfc_NdefRecordTypeImpl.cpp
- src/FNetNfc_NfcAuthorityController.cpp
src/FNetNfc_NfcIpcMessages.cpp
src/FNetNfc_NfcIpcProxy.cpp
src/FNetNfc_NfcManagerEvent.cpp
{
/**
* @namespace Tizen::Net::Nfc
- * @brief This namespace contains the classes and interfaces for the Near Field Communication (NFC) services.
+ * @brief This namespace contains classes and interfaces for Near Field Communication (NFC) services.
* @since 2.0
*
* @remarks @b Header @b %file: @b \#include @b <FNet.h> @n
- * @b Library : @b osp-nfc @n
+ * @b Library: @b osp-nfc
*
- * The %Nfc namespace contains the various classes and interfaces for the Near Field Communication (NFC) programming
- * that enables the devices to share information within a distance of less than @c 4 centimeters.
+ * The %Nfc namespace contains various classes and interfaces for Near Field Communication (NFC) programming
+ * that enables devices to share information within a distance of less than @c 4 centimeters.
*
* For more information on the NFC namespace features, see
* <a href="../org.tizen.native.appprogramming/html/guide/net/nfc.htm">NFC Guide</a>.
/**
* @interface INdefMessageDiscoveryEventListener
- * @brief This interface provides a listener for the events related to the NDEF message discovery.
+ * @brief This interface provides a listener for the events related to an NDEF message discovery.
*
* @since 2.0
*
- * The %INdefMessageDiscoveryEventListener interface specifies the methods used for creating notifications about the
- * NDEF message discovered from the target tag.
+ * The %INdefMessageDiscoveryEventListener interface specifies the methods used for creating notifications about an
+ * NDEF message discovered from a target tag.
*
* For more information on the class features, see
* <a href="../org.tizen.native.appprogramming/html/guide/net/nfc.htm">NFC Guide</a>.
virtual ~INdefMessageDiscoveryEventListener(void) {}
/**
- * Called to notify the application when an NDEF message, that includes the NDEF records with the specified filter
+ * Called to notify the application when an NDEF message, that includes NDEF records with the specified filter
* type, is detected.
*
* @since 2.0
*
* @param[in] pMessage The detected NDEF message
* @remarks
- * - This method can be used for read-only access to the data on the target without opening a
- * connection to it.
+ * - This method can be used for providing read-only access to the data on the target without opening a
+ * connection to it.
* - The input NdefMessage object must be deleted by the application after use, even outside this
- * method. The NdefMessage::RemoveAllRecords() method must be called with @c true as the input value
- * immediately before the NdefMessage object is deleted.
+ * method. The NdefMessage::RemoveAllRecords() method must be called with @c true as the input value
+ * immediately before the %NdefMessage object is deleted.
*/
virtual void OnNdefMessageDetectedN(NdefMessage* pMessage) = 0;
{
/**
* @interface INdefPushManagerListener
- * @brief This interface provides a listener for the events related to the %NfcPushManager.
+ * @brief This interface provides a listener for the events related to %NfcPushManager.
* @since 2.0
*
- * The %INdefPushManagerListener interface specifies the methods used for receiving the status of the pushed NDEF
+ * The %INdefPushManagerListener interface specifies the methods used for receiving the status of a pushed NDEF
* message asynchronously.
*
* For more information on the class features, see
virtual ~INdefPushManagerListener(void) {}
/**
- * Called when the push operation to the target device is completed.
+ * Called when a push operation to the target device is completed.
*
* @since 2.0
*
- * @param[in] r The result of pushed NDEF message @n
+ * @param[in] r The result of a pushed NDEF message @n
* The following exceptions may be given through this parameter.
* @exception E_SUCCESS The method is successful.
* @exception E_NOT_RESPONDING The device is not responding.
/**
* @interface INdefTagConnectionListener
- * @brief This interface provides a listener for the events related to the NDEF tag connection.
+ * @brief This interface provides a listener for the events related to an NDEF tag connection.
*
* @since 2.0
*
- * The %INdefTagConnectionListener interface specifies the methods used for creating the notifications about the result
- * of an action for the NdefTagConnection, such as reading and writing the NDEF data.
+ * The %INdefTagConnectionListener interface specifies the methods used for creating notifications about the result
+ * of an action performed for NdefTagConnection, such as reading and writing the NDEF data.
*
* For more information on the class features, see
* <a href="../org.tizen.native.appprogramming/html/guide/net/nfc.htm">NFC Guide</a>.
virtual ~INdefTagConnectionListener(void) {}
/**
- * Called to notify the application when the read operation from the target tag is completed.
+ * Called to notify the application when a read operation from the target tag is completed.
*
* @since 2.0
*
* @param[in] pMessage The read NdefMessage object, @n
- * else @c null if the method is not successful
+ * else @c null if it fails
* @param[in] r An error code
* @exception E_SUCCESS The method is successful.
* @exception E_DATA_NOT_FOUND The target tag has no NDEF record.
virtual void OnNdefReadCompletedN(NdefMessage* pMessage, result r) = 0;
/**
- * Called to notify the application when the write operation on the target tag is completed.
+ * Called to notify the application when a write operation on the target tag is completed.
*
* @since 2.0
*
* @param[in] r An error code
* @exception E_SUCCESS The method is successful.
- * @exception E_ILLEGAL_ACCESS The write operation on the target tag is denied. @n
- * The target tag is locked or protected for the write operation.
- * @exception E_STORAGE_FULL The storage capacity of the target tag is full.
+ * @exception E_ILLEGAL_ACCESS Either of the following conditions has occurred:
+ * - The write operation on the target tag is denied.
+ * - The target tag is locked or protected for the write operation.
+ * @exception E_STORAGE_FULL The storage capacity of the target tag has reached the maximum limit.
* @exception E_NOT_RESPONDING The target tag is not responding.
* @exception E_SYSTEM A system error has occurred.
* @see NdefTagConnection::Write()
/**
* @interface INfcDeviceDiscoveryEventListener
- * @brief This interface provides a listener for the events related to device discovery.
+ * @brief This interface provides a listener for the events related to a device discovery.
* @since 2.0
*
- * The %INfcDeviceDiscoveryEventListener interface specifies the methods used for creating the notifications
+ * The %INfcDeviceDiscoveryEventListener interface specifies the methods used for creating notifications
* about detecting a device.
*
* For more information on the class features, see
*
* @since 2.0
*
- * The %INfcManagerEventListener interface specifies the method used for creating the notifications about a change in
- * the NfcManager status.
+ * The %INfcManagerEventListener interface specifies the methods used for creating notifications about a change in
+ * the NfcManager's status.
*
* For more information on the class features, see
* <a href="../org.tizen.native.appprogramming/html/guide/net/nfc.htm">NFC Guide</a>.
/**
* @interface INfcTagDiscoveryEventListener
- * @brief This interface provides a listener for the events related to tag discovery.
+ * @brief This interface provides a listener for the events related to a tag discovery.
*
* @since 2.0
*
- * The %INfcTagDiscoveryEventListener interface specifies the methods used for creating the notifications about
- * detecting the target tag.
+ * The %INfcTagDiscoveryEventListener interface specifies the methods used for creating notifications about
+ * detecting a target tag.
*
* For more information on the class features, see
* <a href="../org.tizen.native.appprogramming/html/guide/net/nfc.htm">NFC Guide</a>.
virtual ~INfcTagDiscoveryEventListener(void) {}
/**
- * Called to notify the application when the tag is detected by the device.
+ * Called to notify the application when a tag is detected by the device.
*
* @since 2.0
*
* @param[in] pConnection The connection established with the detected tag
* @remarks TagConnection is inherited by NdefTagConnection if the current attached tag supports NDEF
- * operations.
- * To verify this, use TagConnection::IsNdefConnection().
+ * operations. To verify this, use TagConnection::IsNdefConnection().
*/
virtual void OnNfcTagDetectedN(TagConnection* pConnection) = 0;
/**
- * Called to notify the application when the tag is lost by the device.
+ * Called to notify the application when a tag is lost by the device.
*
* @since 2.0
*
/**
* @interface ITagConnectionListener
- * @brief This interface provides a listener for the events related to the tag connection.
+ * @brief This interface provides a listener for the events related to a tag connection.
*
* @since 2.0
*
- * The %ITagConnectionListener interface provides methods that are used for creating notifications for the result of
- * the actions of the TagConnection, such as sending a command.
+ * The %ITagConnectionListener interface provides methods that are used for creating notifications about the result of
+ * an action performed for TagConnection, such as sending a command.
*
* For more information on the class features, see
* <a href="../org.tizen.native.appprogramming/html/guide/net/nfc.htm">NFC Guide</a>.
virtual ~ITagConnectionListener(void) {}
/**
- * Called to notify the application when the response is received from the remote tag.
+ * Called to notify the application when a response is received from a remote tag.
*
* @since 2.0
*
- * @param[in] pResponse The response of the command as the Tizen::Base::ByteBuffer object, @n
- * else @c null if the method is not successful
+ * @param[in] pResponse The response of the command as a Tizen::Base::ByteBuffer object, @n
+ * else @c null if it fails
* @param[in] r An error code
* @exception E_SUCCESS The method is successful.
* @exception E_ILLEGAL_ACCESS The sent command is denied by the target. @n
*
* @since 2.0
*
- * The %NdefMessage class represents an NDEF message. An NDEF message is composed of 1 or more NDEF records. Therefore,
- * this class has NdefRecord instances and provides the operations to manipulate the list of those instances. These
+ * The %NdefMessage class represents an NDEF message. An NDEF message is composed of @c 1 or more NDEF records. Therefore,
+ * this class has NdefRecord instances and provides operations to manipulate the list of those instances. These
* operations are very similar to those of the Tizen::Base::Collection::IList class.
*
* If a new NDEF record is inserted, the uniqueness of its payload identifier is checked. This class also provides
*
* @since 2.0
*
- * @param[in] value An instance of %NdefMessage
- * @remarks This performs a deep copy.
+ * @param[in] value An instance of %NdefMessage to copy
+ * @remarks This method performs a deep copy.
*/
NdefMessage(const NdefMessage& value);
virtual ~NdefMessage(void);
/**
- * Compares the calling instance with the specified instance.
+ * Compares the specified instance with the current instance.
*
* @since 2.0
*
- * @return @c true if the specified instance of Tizen::Base::Object is equal to the calling %NdefMessage
- * instance, @n
+ * @return @c true if the specified instance of Tizen::Base::Object is equal to the current %NdefMessage instance, @n
* else @c false
* @param[in] obj The object to compare
* @remark Two %NdefMessage instances are equal only if they contain the same NdefRecord instances in the
* else @c null if the index is not valid
* @param[in] index The index of the NDEF record to get
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the record list. @n
- * The specified @c index parameter is either greater than or equal to the number
- * of elements or less than @c 0.
+ * @exception E_OUT_OF_RANGE Either of the following conditions has occurred:
+ * - The specified @c index is outside the bounds of the record list.
+ * - The specified @c index is either greater than or equal to the number of elements.
+ * - The specified @c index is less than @c 0.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
NdefRecord* GetRecordAt(int index) const;
* else @c null if no record matches
* @param[in] payloadId The payload identifier of the NDEF record to get
* @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_NOT_FOUND The specified @c id is not found in any of the NDEF records.
+ * @exception E_OBJ_NOT_FOUND The specified @c payloadId is not found in any of the NDEF records.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
NdefRecord* GetRecord(const Tizen::Base::String& payloadId) const;
* For example, the record has the same payload identifier as the other records in
* this NDEF message.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @remarks This method performs a shallow copy. It adds just the pointer, not the NdefRecord instance.
+ * @remarks This method performs a shallow copy. It adds just the pointer and not the NdefRecord instance.
*/
result AppendRecord(const NdefRecord& record);
*
* @return An error code
* @param[in] record The NDEF record to insert
- * @param[in] index The index at which the NDEF record must be inserted
+ * @param[in] index The index at which the NDEF record is inserted
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the record list. @n
- * The specified @c index is greater than the number of elements or less than
- * @c 0.
+ * @exception E_OUT_OF_RANGE Either of the following conditions has occurred:
+ * - The specified @c index is outside the bounds of the record list.
+ * - The specified @c index is greater than the number of elements.
+ * - The specified @c index is less than @c 0.
* @exception E_INVALID_ARG The specified NDEF record is invalid. @n
* For example, the record has the same payload identifier as the other records in
* this NDEF message.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks
- * - The NDEF records that appear after the insertion point move downwards to accommodate the inserted
- * NDEF record.
- * - This method performs a shallow copy. It adds just the pointer, not the NdefRecord instance.
+ * - The NDEF records that appear after the insertion point move downwards to accommodate the inserted
+ * NDEF record.
+ * - This method performs a shallow copy. It adds just the pointer and not the NdefRecord instance.
*/
result InsertRecordAt(const NdefRecord& record, int index);
* @param[in] deallocate Set to @c true to deallocate the replaced record, @n
* else @c false
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the record list. @n
- * The specified @c index is either equal to or greater than the number of
- * elements or less than @c 0.
+ * @exception E_OUT_OF_RANGE Either of the following conditions has occurred:
+ * - The specified @c index is outside the bounds of the record list.
+ * - The specified @c index is either greater than or equal to the number of elements.
+ * - The specified @c index is less than @c 0.
* @exception E_INVALID_ARG The specified NDEF record is invalid. @n
* For example, the record has the same payload identifier as the other records in
* this NDEF message.
- * @remarks This method performs a shallow copy. It adds just the pointer, not the NdefRecord instance.
+ * @remarks This method performs a shallow copy. It adds just the pointer and not the NdefRecord instance.
*/
result SetRecordAt(const NdefRecord& record, int index, bool deallocate = false);
/**
- * Removes the NDEF record from a specified location.
+ * Removes the NDEF record from the specified location.
*
* @since 2.0
*
* @param[in] deallocate Set to @c true to deallocate the record, @n
* else @c false
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the record list. @n
- * The specified @c index is either equal to or greater than the number of
- * elements or less than @c 0.
+ * @exception E_OUT_OF_RANGE Either of the following conditions has occurred:
+ * - The specified @c index is outside the bounds of the record list.
+ * - The specified @c index is either greater than or equal to the number of elements.
+ * - The specified @c index is less than @c 0.
* @remarks The NDEF records that appear after the deletion point move upwards to occupy the vacated spot.
*/
result RemoveRecordAt(int index, bool deallocate = false);
/**
* Removes all the records in the NDEF message. @n
- * If the specified @c deallocate parameter is set to @c true, it deallocates all the NdefRecord instances in the
+ * If the specified @c deallocate is set to @c true, it deallocates all the NdefRecord instances in the
* message.
*
* @since 2.0
*
* @return The instance of the created NDEF message, @n
* else @c null if the conversion fails
- * @param[in] buffer An NDEF message as a byte sequence
+ * @param[in] buffer The NDEF message as a byte sequence
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_FORMAT The specified @c buffer cannot be formulated to the NDEF message.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @since 2.0
*
* @return A reference to the %NdefMessage instance
- * @param[in] rhs A reference to the %NdefMessage instance to copy
+ * @param[in] rhs A reference to the %NdefMessage instance to copy
*/
NdefMessage& operator =(const NdefMessage& rhs);
/**
* @class NdefPushManager
- * @brief This is the class for pushing an NDEF message to a device.
+ * @brief This class provides methods for pushing an NDEF message to a device.
*
* @since 2.0
*
* @final This class is not intended for extension.
*
- * The %NdefPushManager class is the class for pushing an NDEF message to a device.
+ * The %NdefPushManager class provides methods for pushing an NDEF message to a device.
*
* For more information on the class features, see
* <a href="../org.tizen.native.appprogramming/html/guide/net/nfc.htm">NFC Guide</a>.
* __pNdefPushManager->SetNdefPushManagerListener(this);
* }
*
- * // This method is invoked when a NFC device is detected
+ * // This method is invoked when an NFC device is detected
* void
* MyClass::OnNfcDeviceDetected(void)
* {
* @feature %http://tizen.org/feature/network.nfc
*
* @return An error code
- * @param[in] pListener An instance of %INdefPushManagerListener. @n
- * If it is null, it will reset the listener.
+ * @param[in] pListener An instance of INdefPushManagerListener @n
+ * If it is @c null, it resets the listener.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
* Application Filtering</a>.
* @exception E_OPERATION_FAILED The operation has failed.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @remarks Before calling this method, check whether the feature is supported by
* Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
*/
* @return An error code
* @param[in] message The NDEF message to send
* @exception E_SUCCESS The method is successful.
- * @exception E_DEVICE_BUSY The device is processing preceding job.
+ * @exception E_DEVICE_BUSY The device is processing a preceding job.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_INVALID_STATE This instance is in an invalid state. @n
* For example, the NFC feature is not activated or a peer device is not
* attached.
- * @exception E_INVALID_ARG The input @c message is invalid. @n
+ * @exception E_INVALID_ARG The specified @c message is invalid. @n
* For example, it does not contain any NDEF records.
* @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
* For more information, see
* Application Filtering</a>.
* @exception E_OPERATION_FAILED The operation has failed.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @remarks Before calling this method, check whether the feature is supported by
* Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
*/
result Push(const NdefMessage& message);
/**
- * Activates the Reserved Push feature that sends the preselected NDEF message to the connected NFC peer device on
+ * Activates the Reserved Push feature that sends a preselected NDEF message to the connected NFC peer device on
* behalf of the application.
*
* @since 2.1
*
* @return An error code
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified
- * operation. @n
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
* For example, Reserved Push is already activated.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
* @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks Before calling this method, check whether the feature is supported by
* Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
- * @see <a href="../org.tizen.native.appprogramming/html/guide/net/nfc_reserved_push.htm">
+ * @see <a href="../org.tizen.native.appprogramming/html/guide/net/nfc_reserved_push.htm">
* The NFC Reserved Push guide</a>
*/
result ActivateReservedPush(void);
/**
- * Deactivates the Reserved Push feature that sends the preselected NDEF message to the connected NFC peer device on
+ * Deactivates the Reserved Push feature that sends a preselected NDEF message to the connected NFC peer device on
* behalf of the application.
*
* @since 2.1
bool IsReservedPushActivated(void) const;
/**
- * Gets information of all the Reserved Push candidates. @n Each element of the result Tizen::Base::Collection::IMap consists of the package ID
+ * Gets the information of all the Reserved Push candidates. @n Each element of the result Tizen::Base::Collection::IMap consists of the package ID
* of the application that registered the NDEF message and the description about the registered NDEF message.
*
* @since 2.1
*
- * @return An IMapT containing the pairs of package ID and message description if successful, @n
- * else @c null
- * @remarks The key of the returned Tizen::Base::Collection::IMap should be casted to Tizen::App::PackageId pointer and the value should
- * be casted to Tizen::Base::String pointer.
+ * @return A Tizen::Base::Collection::IMap that contains the package ID and message description pairs, @n
+ * else @c null if it fails
+ * @remarks The key of the returned Tizen::Base::Collection::IMap should be cast to the Tizen::App::PackageId pointer and the value should
+ * be cast to the Tizen::Base::String pointer.
*/
Tizen::Base::Collection::IMap* GetReservedPushCandidatesN(void) const;
/**
- * Picks out an NDEF message among all the Reserved Push candidates by the application ID. @n The selected NDEF message is
+ * Picks out an NDEF message from all the Reserved Push candidates by the application ID. @n The selected NDEF message is
* pushed when a peer device is detected.
*
* @since 2.1
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
*
* @remarks
- * - The only one message can be selected to push. So the previously selected message will be replaced
- * by the new one.
- * - Before calling this method, check whether the feature is supported by
- * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
+ * - Only one message can be selected to push. So the previously selected message is replaced
+ * by the new one.
+ * - Before calling this method, check whether the feature is supported by
+ * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
* @see <a href="../org.tizen.native.appprogramming/html/guide/net/nfc_reserved_push.htm">
* The NFC Reserved Push guide</a>
*/
result PickReservedPushMessage(const Tizen::App::PackageId& packageId);
/**
- * Gets the owner application ID of the picked NDEF message among all the Reserved Push candidates.
+ * Gets the owner application ID of the picked NDEF message from all the Reserved Push candidates.
*
* @since 2.1
* @feature %http://tizen.org/feature/network.nfc and %http://tizen.org/feature/network.nfc.reserved_push @n
* Both the features are required.
*
- * @return The package ID of the application which is the owner of the picked Reserved Push message @n
+ * @return The package ID of the application which is the owner of the picked Reserved Push message, @n
* else an empty string if an error occurs
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND There is no element in the Reserved Push candidate list.
/**
* Registers an NDEF message as a Reserved Push candidate. @n
- * If the message is picked out among the candidates, it is pushed to the detected peer device when the home screen
+ * If the message is picked out from the candidates, it is pushed to the detected peer device when the home screen
* or the main menu is on top of the screen in the local device.
*
* @since 2.0
* @return An error code
* @param[in] message The NDEF message to register
* @param[in] description The description for the NDEF message to register @n
- * This description can be used in Reserved Push UI, for example, UI for
- * getting user consent to send the registered message.
+ * This description can be used in the Reserved Push UI, for example, the UI for
+ * getting the user's consent to send the registered message.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The input @c message is invalid. @n
+ * @exception E_INVALID_ARG The specified @c message is invalid. @n
* For example, it does not contain any NDEF records.
* @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
* For more information, see
* <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">
* Application Filtering</a>.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks
- * - An application can register only one NDEF message. So the previously registered message will be
+ * - An application can register only one NDEF message. So the previously registered message is
* replaced by the new one.
* - The registered NDEF message is pushed only if it is selected by the user through the Setting
* application.
* <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">
* Application Filtering</a>.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks Before calling this method, check whether the feature is supported by
* Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
* @since 2.0
*
* The %NdefRecord class represents an NDEF record, including certain attributes such as the type, the payload, and the
- * payload identifier. It provides the operations to manipulate them. However, this class does not expose all the
+ * payload identifier. It provides operations to manipulate them. However, this class does not expose all the
* attributes of an NDEF record. Some attributes defined in the NDEF specification are hidden because they are not
* important for applications. @n
* The NDEF record may contain an NDEF message in the payload. It can be converted from a Tizen::Base::ByteBuffer
*
* @since 2.0
*
- * @param[in] recordType A specified NDEF record type
+ * @param[in] recordType The specified NDEF record type
*/
NdefRecord(const NdefRecordType& recordType);
*
* @since 2.0
*
- * @param[in] value An instance of %NdefRecord
- * @remarks It performs a deep copy.
+ * @param[in] value An instance of %NdefRecord to copy
+ * @remarks This method performs a deep copy.
*/
NdefRecord(const NdefRecord& value);
virtual ~NdefRecord(void);
/**
- * Compares the calling instance with the specified instance.
+ * Compares the specified instance with the current instance.
*
* @since 2.0
*
- * @return @c true if the specified instance of Tizen::Base::Object is equal to the calling %NdefRecord instance, @n
+ * @return @c true if the specified instance of Tizen::Base::Object is equal to the current %NdefRecord instance, @n
* else @c false
* @param[in] obj The object to compare
- * @remark Two %NdefRecord instances are equal only if they contain the same NdefRecordType instances,
+ * @remark Two %NdefRecord instances are equal only if they contain the same NdefRecordType instance,
* payload ID, and payload.
*/
virtual bool Equals(const Tizen::Base::Object& obj) const;
* @return An error code
* @param[in] type The record type to set
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The input argument is invalid. @n
+ * @exception E_INVALID_ARG The specified input parameter is invalid. @n
* For example, @c NDEF_TNF_EMPTY is not allowed as the input value if the identifier
* is not an empty string or the payload is not @c null.
*/
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_INVALID_ARG The @c payload is invalid. @n
* For example, @c payload is not constructed.
- * @remarks The view of the specified @c payload parameter is copied and the data is shared. Therefore, if the
+ * @remarks The view of the specified @c payload is copied and the data is shared. Therefore, if the
* data of @c payload is modified after setting, the data of the payload in this record also changes.
*/
result SetPayload(const Tizen::Base::ByteBuffer& payload);
/**
- * Assigns the value of a specified instance to the current instance of %NdefRecord.
+ * Assigns the value of the specified instance to the current instance of %NdefRecord.
*
* @since 2.0
*
* @return A reference to the %NdefRecord instance
- * @param[in] rhs A reference to the %NdefRecord instance to copy
+ * @param[in] rhs A reference to the %NdefRecord instance to copy
*/
NdefRecord& operator =(const NdefRecord& rhs);
*
* @since 2.0
*
- * The %NdefRecordType class represents the type of an NDEF record. It encapsulates the name and the name format of the
+ * The %NdefRecordType class represents the type of an NDEF record. It encapsulates the name and the name format of an
* NDEF record type. @n
* The name format is represented by the enumeration type, Tizen::Net::Nfc::NdefRecordTypeNameFormat. The name is
* encoded using the US_ASCII character set and follows the rules defined by the NFC forum RTDs and RFCs. The name does
*
* @since 2.0
*
- * @param[in] recordType An instance of %NdefRecordType
+ * @param[in] recordType An instance of %NdefRecordType to copy
*/
NdefRecordType(const NdefRecordType& recordType);
*
* @since 2.0
*
- * @param[in] rhs An instance of %NdefRecordType
+ * @param[in] rhs An instance of %NdefRecordType to copy
*/
NdefRecordType& operator =(const NdefRecordType& rhs);
/**
- * Compares the specified instance of Tizen::Base::Object with the calling instance of %NdefRecordType.
+ * Compares the specified instance of Tizen::Base::Object with the current instance of %NdefRecordType.
*
* @since 2.0
*
* @since 2.0
*
* @return The name of this record type, @n
- * else an empty string if the name format is ::NDEF_TNF_EMPTY or ::NDEF_TNF_UNKNOWN
+ * else an empty string if the name format is ::NDEF_TNF_EMPTY or ::NDEF_TNF_UNKNOWN
* @remarks
- * - The name does not have the prefix @c "urn:nfc:wkt:" and @c "urn:nfc:ext:" defined by the
- * NFC forum.
- * - In case of ::NDEF_TNF_ABSOLUTE_URI name format, this method returns the name in the same format as
- * it is given in the constructor, that is, with or without percent encoding. The name consists of
- * the characters encoded using the US_ASCII character set.
+ * - The name does not have the prefix @c "urn:nfc:wkt:" and @c "urn:nfc:ext:" defined by the
+ * NFC forum.
+ * - In case of ::NDEF_TNF_ABSOLUTE_URI name format, this method returns the name in the same format as
+ * it is given in the constructor, that is, with or without percent encoding.
+ * - The name consists of the characters encoded using the US_ASCII character set.
*/
Tizen::Base::String GetName(void) const;
*
* @return An error code
* @param[in] name The name of this record type @n
- * The input name must not have the prefix defined by the NFC forum such as @c "urn:nfc:wkt:" and
- * @c "urn:nfc:ext:".
+ * The input name must not have the prefix defined by the NFC forum such as @c "urn:nfc:wkt:" and
+ * @c "urn:nfc:ext:".
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION This operation is not allowed if the name format is ::NDEF_TNF_EMPTY,
* ::NDEF_TNF_UNKNOWN, or ::NDEF_TNF_ALL.
/**
* @class NdefTagConnection
- * @brief This class represents the connection with an NFC tag that has the NDEF data.
+ * @brief This class represents the connection with an NFC tag that has NDEF data.
*
* @since 2.0
*
- * The %NdefTagConnection class provides the mechanism to communicate with the tag that has NFC Data Exchange Format
- * (NDEF) data and supports the NDEF message operations. @n
+ * The %NdefTagConnection class provides the mechanism to communicate with a tag that has NFC Data Exchange Format
+ * (NDEF) data and supports NDEF message operations. @n
* This class can be derived from the TagConnection class. Use the IsNdefConnection() method to check the availability
* of the derivation. @n
* Use the Read() and Write() methods to read and write the NDEF data. After the completion of the read and write
* @exception E_SUCCESS The method is successful.
* @exception E_IN_PROGRESS The read process is in progress.
* @exception E_CONNECTION_BUSY The connection is busy. Therefore, the method cannot process the read request.
- * @exception E_CONNECTION_FAILED The connection to the tag is closed or it has failed.
+ * @exception E_CONNECTION_FAILED The connection to the tag has closed or has failed.
* @exception E_SYSTEM A system error has occurred.
* @see INdefTagConnectionListener::OnNdefReadCompletedN()
*/
* @return An error code
* @param[in] message The NDEF message to write to the target
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The input @c message is invalid. @n
+ * @exception E_INVALID_ARG The specified @c message is invalid. @n
* For example, it does not contain any NDEF records.
* @exception E_IN_PROGRESS The write process is in progress.
* @exception E_CONNECTION_BUSY The connection is busy. Therefore, the method cannot process the write request.
- * @exception E_CONNECTION_FAILED The connection to the tag is closed or it has failed.
+ * @exception E_CONNECTION_FAILED The connection to the tag has closed or has failed.
* @exception E_SYSTEM A system error has occurred.
* @see INdefTagConnectionListener::OnNdefWriteCompleted()
*/
*
* @since 2.0
*
- * The %NfcManager class is the manager class for NFC features that includes the methods for enabling and disabling the
- * NFC feature of the device and the mechanism for establishing a connection with the detected tag. It is also used to
- * detect the NFC tags and NDEF messages. @n
+ * The %NfcManager class is the manager class for the NFC features that include methods for enabling and disabling the
+ * NFC feature of a device and the mechanism for establishing a connection with the detected tag. It is also used to
+ * detect NFC tags and NDEF messages. @n
* There are two ways to get the TagConnection instance established with the detected tag. @n
* @li Use the INfcTagDiscoveryEventListener::OnNfcTagDetectedN() method that is invoked immediately when the target
* tag is detected.
* @li Invoke the GetCurrentTagConnectionN() method after the tag is detected.
*
* If the target tag is lost, the INfcTagDiscoveryEventListener::OnNfcTagLost() method is called and the old
- * TagConnection instance becomes invalid. Therefore, the operations performed by the TagConnection class are not
- * processed anymore. Moreover, the TagConnection instance cannot be used again even if the same tags are detected
+ * %TagConnection instance becomes invalid. Therefore, the operations performed by the %TagConnection class are not
+ * processed anymore. Moreover, the %TagConnection instance cannot be used again even if the same tags are detected
* again by the device.
*
* For more information on the class features, see
* operation. @n
* For example, the NFC feature is already activated.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @exception E_SYSTEM A system error has occurred.
* @see INfcManagerEventListener::OnNfcActivated()
*/
* operation. @n
* For example, the NFC feature is already deactivated.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @exception E_SYSTEM A system error has occurred.
* @see INfcManagerEventListener::OnNfcDeactivated()
*/
bool IsActivated(void) const;
/**
- * Checks whether the NFC tag is currently connected with the device.
+ * Checks whether an NFC tag is currently connected to the device.
*
* @since 2.0
*
bool IsTagConnected(void) const;
/**
- * Gets the tag connection with the currently detected tag.
+ * Gets a tag connection with the currently detected tag.
*
* @since 2.0
* @privlevel public
* @privilege %http://tizen.org/privilege/nfc.tag
*
* @return The tag connection with the currently detected tag, @n
- * else @c null if no tag is connected or if the connection fails
+ * else @c null if no tag is connected or the connection fails
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_STATE This instance is in an invalid state. @n
* For example, this instance has not been constructed as yet or the NFC
* feature is not activated.
- * @exception E_CONNECTION_FAILED The connection to the tag is closed or has failed.
+ * @exception E_CONNECTION_FAILED The connection to the tag has closed or has failed.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - The NdefTagConnection class can inherit the TagConnection class if the currently detected tag
- * supports the NDEF operations. To check whether the %TagConnection class is inherited, use the
+ * supports NDEF operations. To check whether the %TagConnection class is inherited, use the
* TagConnection::IsNdefConnection() method.
* - The specific error code can be accessed using the GetLastResult() method.
*/
TagConnection* GetCurrentTagConnectionN(void) const;
/**
- * Adds the specified %INfcTagDiscoveryEventListener instance for the tag events with the specified tag type.
+ * Adds the specified INfcTagDiscoveryEventListener instance for the tag events with the specified tag type.
*
* @since 2.0
* @privlevel public
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_ALREADY_EXIST The listener with the specified type is already added.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @exception E_SYSTEM A system error has occurred.
* @remarks This method can be invoked several times with different Tizen::Net::Nfc::NfcTagType values for the
* same listener instance. In this case, the listener is called if the specified type of the target
result AddTagDiscoveryEventListener(INfcTagDiscoveryEventListener& listener, NfcTagType type);
/**
- * Removes the specified %INfcTagDiscoveryEventListener instance. @n
+ * Removes the specified INfcTagDiscoveryEventListener instance. @n
* The removed listener cannot listen to the events that are fired.
*
* @since 2.0
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The listener with the specified type is not found.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @exception E_SYSTEM A system error has occurred.
*/
result RemoveTagDiscoveryEventListener(INfcTagDiscoveryEventListener& listener, NfcTagType type);
/**
- * Adds the specified %INdefMessageDiscoveryEventListener instance for the events related to an NDEF message that
+ * Adds the specified INdefMessageDiscoveryEventListener instance for the events related to an NDEF message that
* includes the NDEF record with the specified type.
*
* @since 2.0
* For example, the name of the record type is an empty string if the name
* format is ::NDEF_TNF_WELL_KNOWN, ::NDEF_TNF_MIME_MEDIA, ::NDEF_TNF_ABSOLUTE_URI,
* or ::NDEF_TNF_EXTERNAL.
- * @exception E_OBJ_ALREADY_EXIST The listener with the specified type is already added.
+ * @exception E_OBJ_ALREADY_EXIST The listener with the specified @c type is already added.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - This method can be invoked several times with different NdefRecordType values for the same
* listener instance. In this case, the listener is called if the record type in the detected NDEF
* records matches with one of the registered types.
- * - In case of the MIME %Media type as Type Name Format (TNF), asterisks can be used in the type name
+ * - In case of a MIME %Media type such as Type Name Format (TNF), asterisks can be used in the type name
* for wildcard matching, such as @htmlonly "image/*" @endhtmlonly.
*/
result AddNdefMessageDiscoveryEventListener(INdefMessageDiscoveryEventListener& listener, const NdefRecordType& type);
/**
- * Removes the specified %INdefMessageDiscoveryEventListener instance. @n
+ * Removes the specified INdefMessageDiscoveryEventListener instance. @n
* The removed listener cannot listen to the events that are fired.
*
* @since 2.0
* For example, the name of the record type is an empty string if the name
* format is ::NDEF_TNF_WELL_KNOWN, ::NDEF_TNF_MIME_MEDIA, ::NDEF_TNF_ABSOLUTE_URI,
* or ::NDEF_TNF_EXTERNAL.
- * @exception E_OBJ_NOT_FOUND The listener with the specified type is not found.
+ * @exception E_OBJ_NOT_FOUND The listener with the specified @c type is not found.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @exception E_SYSTEM A system error has occurred.
*/
result RemoveNdefMessageDiscoveryEventListener(INdefMessageDiscoveryEventListener& listener, const NdefRecordType& type);
/**
- * Adds the specified %INfcDeviceDiscoveryEventListener instance for the device discovery events.
+ * Adds the specified INfcDeviceDiscoveryEventListener instance for the device discovery events.
*
* @since 2.0
* @privlevel public
* @exception E_OBJ_ALREADY_EXIST The listener has already been added.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @exception E_SYSTEM A system error has occurred.
*/
result AddDeviceDiscoveryEventListener(INfcDeviceDiscoveryEventListener& listener);
/**
- * Removes the specified %INfcDeviceDiscoveryEventListener instance. @n
+ * Removes the specified INfcDeviceDiscoveryEventListener instance. @n
* The removed listener cannot listen to the events that are fired.
*
* @since 2.0
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The listener is not found.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @exception E_SYSTEM A system error has occurred.
*/
result RemoveDeviceDiscoveryEventListener(INfcDeviceDiscoveryEventListener& listener);
/**
- * Checks whether peer device has been detected.
+ * Checks whether a peer device has been detected.
*
* @since 2.0
*
- * @return @c true if peer device has been detected, @n
+ * @return @c true if a peer device has been detected, @n
* else @c false
*/
bool IsDeviceDetected(void) const;
/**
- * Gets the NDEF message cached when the tag is detected.
+ * Gets the cached NDEF message when the tag is detected.
*
* @since 2.0
* @privlevel public
* @privilege %http://tizen.org/privilege/nfc.common
* @feature %http://tizen.org/feature/network.nfc
*
- * @return The cached %NdefMessage instance, @n
- * else @c null if the method is not successful
+ * @return The cached NdefMessage instance, @n
+ * else @c null if it fails
* @exception E_SUCCESS The method is successful.
* @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
* For more information, see
* @exception E_INVALID_FORMAT The cached data cannot be converted to the NDEF message.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - The input NdefMessage instance should be deleted by the application after it is used, even
* Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
* @see <a href="../org.tizen.native.appprogramming/html/guide/net/conditional_nfc_app_launch.htm">
* The Conditional NFC App Launch guide</a>
- * @see Tizen::App::AppManager::RegisterAppLaunch
+ * @see Tizen::App::AppManager::RegisterAppLaunch()
*/
static NdefMessage* GetCachedNdefMessageN(void);
* <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">
* Application Filtering</a>.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - Note that this method is used to enable or disable the launch pop-up when the application is in
/**
* @class NfcTag
- * @brief This class represents the NFC target tag.
+ * @brief This class represents an NFC target tag.
*
* @since 2.0
*
- * The %NfcTag class provides information about the detected NFC tag. @n
+ * The %NfcTag class provides information about a detected NFC tag. @n
* This class has multiple tag types for the target tag. For example, the GetTagTypeList() method returns a list of tag
* types that include ::NFC_TAG_TYPE_MIFARE_UL and ::NFC_TAG_TYPE_FORUM_TYPE_2, because the tag is a Mifare Ultralight tag
* and it is also an NFC Forum tag type 2.
{
public:
/**
- * Gets the list of the tag types.
+ * Gets the list of tag types.
*
* @since 2.0
*
- * @return The list of the tag types @n
+ * @return The list of tag types @n
* The return list includes single or multiple tags. For example, if the target tag is Mifare
* Ultralight tag type and the NFC Forum tag 2 type, the list includes @c NFC_TAG_TYPE_MIFARE_UL and
* @c NFC_TAG_TYPE_FORUM_TYPE_2.
const Tizen::Base::Collection::IListT <NfcTagType>* GetTagTypeList(void) const;
/**
- * Checks whether the tag has the specified tag type.
+ * Checks whether a tag has the specified tag type.
*
* @since 2.0
*
bool HasTagType(NfcTagType type) const;
/**
- * Gets the ID of the tag.
+ * Gets the ID of a tag.
*
* @since 2.0
*
* @return The ID of the tag, @n
* else @c null if the tag has no ID
- * @remarks Most tags have an unique ID (UID) or a random ID (RID) that is generated every time when they are
+ * @remarks Most tags have a unique ID (UID) or a random ID (RID) that is generated every time they are
* discovered. Some tags, however, do not have any ID.
*/
const Tizen::Base::ByteBuffer* GetId(void) const;
* @file FNetNfcNfcTypes.h
* @brief This is the header file for defining types in the %Nfc namespace.
*
-* This header file contains the definition of common types and enumerators for the %NFC features.
+* This header file contains the definition of common types and enumerators for the NFC features.
*/
#ifndef _FNET_NFC_NFC_TYPES_H_
#define _FNET_NFC_NFC_TYPES_H_
/**
* @enum NfcTagType
*
- * Defines the types of the NFC tag.
+ * Defines the types of NFC tags.
*
* @since 2.0
*/
enum NfcTagType
{
NFC_TAG_TYPE_UNKNOWN = 0x00, /**< The unknown tag type
- * @remarks This type should not be used for the event filtering
- * purpose as the input argument of
+ * @remarks This type should not be used for event filtering
+ * purposes as the input argument of
* NfcManager::AddTagDiscoveryEventListener().
*/
NFC_TAG_TYPE_ISO14443_3A, /**< The ISO14443 Part 3A tag type @n
/**
* @enum NdefRecordTypeNameFormat
*
- * Defines the type name formats of the NDEF record.
+ * Defines the type name formats of an NDEF record.
*
* @since 2.0
*/
enum NdefRecordTypeNameFormat
{
NDEF_TNF_EMPTY = 0x00, /**< The empty record type */
- NDEF_TNF_WELL_KNOWN = 0x01, /**< The NFC forum defined record type */
+ NDEF_TNF_WELL_KNOWN = 0x01, /**< The NFC forum-defined record type */
NDEF_TNF_MIME_MEDIA = 0x02, /**< The RFC2046 MIME media record type */
NDEF_TNF_ABSOLUTE_URI = 0x03, /**< The absolute URI record type */
NDEF_TNF_EXTERNAL = 0x04, /**< The user-defined record type (application specific) */
/**
* @class TagConnection
- * @brief This class represents the connection with an NFC tag. It provides the mechanism to communicate with the NFC
- * tag through ISO14443 or a general Radio Frequency Identification (RFID) manner.
+ * @brief This class represents the connection with an NFC tag. It provides a mechanism to communicate with the NFC
+ * tag through ISO14443 or in a general Radio Frequency Identification (RFID) manner.
*
* @since 2.0
*
- * The %TagConnection class represents the connection with an NFC tag. It provides the mechanism to communicate with
- * the NFC tag through ISO14443 or a general Radio Frequency Identification (RFID) manner. @n
+ * The %TagConnection class represents the connection with an NFC tag. It provides a mechanism to communicate with
+ * the NFC tag through ISO14443 or in a general Radio Frequency Identification (RFID) manner. @n
* The class has an NfcTag instance that represents the target tag. This class can be inherited by the
* NdefTagConnection class if the target tag supports the NFC Data Exchange Format (NDEF) operations.
*
const NfcTag* GetTargetTag(void) const;
/**
- * Sets a listener for receiving the response of the command sent on this tag connection.
+ * Sets a listener for receiving the response of a command sent on this tag connection.
*
* @since 2.0
*
* @return An error code
* @param[in] pListener The listener to add @n
- * If it is @c null, the listener that is already registered gets unregistered.
+ * If it is @c null, the listener that is already registered gets unregistered.
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
* @remarks Only one event listener can be registered.
* @return An error code
* @param[in] command The command to send
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The input @c command is invalid.
+ * @exception E_INVALID_ARG The specified @c command is invalid.
* @exception E_IN_PROGRESS The previous send request is in progress.
* @exception E_CONNECTION_BUSY The connection is busy. Therefore, the method cannot process the send request.
- * @exception E_CONNECTION_FAILED The connection to the tag is closed or it has failed.
+ * @exception E_CONNECTION_FAILED The connection to the tag has closed or has failed.
* @exception E_SYSTEM A system error has occurred.
* @see ITagConnectionListener::OnNfcResponseReceivedN()
*/
%prep
%setup -q
-%build
+%build
+%if 0%{?tizen_build_binary_release_type_eng}
+CXXFLAGS="$CXXFLAGS -D_SECURE_LOG"
+%endif
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
%ifarch %{ix86}
-CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%if 0%{?simulator}
+CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%else
+CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ " cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%endif
%else
+%if 0%{?tizen_build_binary_release_type_eng}
CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%else
+CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%endif
%endif
# Call make instruction with smp support
bool isNfcSupported = false;
r = _SystemInfoImpl::GetSysInfo(L"http://tizen.org/feature/network.nfc", isNfcSupported);
- TryReturn((r == E_SUCCESS) && (isNfcSupported == true), E_UNSUPPORTED_OPERATION,
- "[E_UNSUPPORTED_OPERATION] NFC is not supported.");
+ SysTryReturnResult(NID_NET_NFC, (r == E_SUCCESS) && (isNfcSupported == true), E_UNSUPPORTED_OPERATION, "NFC is not supported.");
SysAssertf(__pImpl == null,
"Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
__pImpl = new (std::nothrow) _NfcManagerImpl;
- TryReturn(__pImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Creating __pImpl instance failed.");
+ SysTryReturnResult(NID_NET_NFC, __pImpl != null, E_OUT_OF_MEMORY, "Creating __pImpl instance failed.");
r = __pImpl->Construct(listener);
r = TransExceptionsExclusive(r, E_SYSTEM, E_OUT_OF_MEMORY);
// Privilege check
r = _AccessController::CheckUserPrivilege(_PRV_NFC_TAG);
r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY, E_USER_NOT_CONSENTED);
- TryCatch(r == E_SUCCESS, , "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
+ SysTryReturn(NID_NET_NFC, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
return __pImpl->GetCurrentTagConnectionN();
-
- CATCH:
- SetLastResult(r);
-
- return null;
}
NdefMessage*
ClearLastResult();
r = _SystemInfoImpl::GetSysInfo(L"http://tizen.org/feature/network.nfc", isNfcSupported);
- TryCatch((r == E_SUCCESS) && (isNfcSupported == true), r = E_UNSUPPORTED_OPERATION,
+ SysTryReturn(NID_NET_NFC, (r == E_SUCCESS) && (isNfcSupported == true), null, E_UNSUPPORTED_OPERATION,
"[E_UNSUPPORTED_OPERATION] NFC is not supported.");
// Privilege check
r = _AccessController::CheckUserPrivilege(_PRV_NFC_COMMON);
r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY, E_USER_NOT_CONSENTED);
- TryCatch(r == E_SUCCESS, , "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
+ SysTryReturn(NID_NET_NFC, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
return _NfcManagerImpl::GetCachedNdefMessageN();
-
-CATCH:
- SetLastResult(r);
-
- return null;
}
result
bool isNfcSupported = false;
r = _SystemInfoImpl::GetSysInfo(L"http://tizen.org/feature/network.nfc", isNfcSupported);
- TryReturn((r == E_SUCCESS) && (isNfcSupported == true), E_UNSUPPORTED_OPERATION,
- "[E_UNSUPPORTED_OPERATION] NFC is not supported.");
+ SysTryReturnResult(NID_NET_NFC, (r == E_SUCCESS) && (isNfcSupported == true), E_UNSUPPORTED_OPERATION, "NFC is not supported.");
// Privilege check
r = _AccessController::CheckUserPrivilege(_PRV_NFC_COMMON);
{
// Checks whether the same id already exists or not
NdefRecord* pRecord = GetRecord(recordId);
- TryReturn(pRecord == null, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument is used. NDEF record with the same payload identifier already exists.");
+ SysTryReturnResult(NID_NET_NFC, pRecord == null, E_INVALID_ARG, "Invalid argument is used. NDEF record with the same payload identifier already exists.");
}
recordType = record.GetRecordType();
{
// Checks whether the same id already exists or not
NdefRecord* pRecord = GetRecord(recordId);
- TryReturn(pRecord == null, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument is used. NDEF record with the same payload identifier already exists.");
+ SysTryReturnResult(NID_NET_NFC, pRecord == null, E_INVALID_ARG, "Invalid argument is used. NDEF record with the same payload identifier already exists.");
}
recordType = record.GetRecordType();
int searchIndex = -1;
result res = E_SUCCESS;
res = __pRecordList->IndexOf(*pRecord, searchIndex);
- TryReturn(searchIndex == index, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument is used. NDEF record with the same payload identifier already exists.");
+ SysTryReturnResult(NID_NET_NFC, searchIndex == index, E_INVALID_ARG,
+ "Invalid argument is used. NDEF record with the same payload identifier already exists.");
}
}
String payloadId;
pPayload = new (std::nothrow) ByteBuffer();
- TryCatch(pPayload != null, r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_NET_NFC, pPayload != null, r = E_OUT_OF_MEMORY, r, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = ParseRecord(recordType, cf, payloadId, *pPayload, *pBuffer);
if (r != E_SUCCESS)
ByteBuffer* pAssembledPayload = null;
pChunkedPayloadList = new (std::nothrow) LinkedList();
- TryCatch(pChunkedPayloadList != null, r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_NET_NFC, pChunkedPayloadList != null, r = E_OUT_OF_MEMORY, r, "[E_OUT_OF_MEMORY] Memory allocation failed.");
int chunkedPayloadLen = pPayload->GetRemaining();
do
{
pPayload = new (std::nothrow) ByteBuffer();
- TryCatch(pPayload != null, r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_NET_NFC, pPayload != null, r = E_OUT_OF_MEMORY, r, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = ParseRecord(recordType, cf, payloadId, *pPayload, *pBuffer);
SysTryCatch(NID_NET_NFC, r == E_SUCCESS, r = E_INVALID_FORMAT, r,
"[E_INVALID_FORMAT] Cannot be formulated to NDEF message");
// Assemble Payload;
pAssembledPayload = new (std::nothrow) ByteBuffer();
- TryCatch(pAssembledPayload != null, r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_NET_NFC, pAssembledPayload != null, r = E_OUT_OF_MEMORY, r, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pAssembledPayload->Construct(payloadLen);
for (int i = 0; i < pChunkedPayloadList->GetCount(); i++)
{
String mimeName;
pList = new (std::nothrow) LinkedList();
- TryCatch(pList != null, r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_NET_NFC, pList != null, r = E_OUT_OF_MEMORY, r, "[E_OUT_OF_MEMORY] Memory allocation failed.");
switch (tnf)
{
case NDEF_TNF_EXTERNAL:
case NDEF_TNF_UNKNOWN:
pRecordType = new (std::nothrow) NdefRecordType(recordType);
- TryCatch(pRecordType != null, r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_NET_NFC, pRecordType != null, r = E_OUT_OF_MEMORY, r, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pList->Add(*pRecordType);
break;
name = recordType.GetName();
pRecordType = new (std::nothrow) NdefRecordType(recordType);
- TryCatch(pRecordType != null, r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_NET_NFC, pRecordType != null, r = E_OUT_OF_MEMORY, r, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pList->Add(*pRecordType);
if (name.StartsWith(L"*", 0) == false)
return pList;
CATCH:
- SetLastResult(r);
-
if (pList != null)
{
pList->RemoveAll(true);
result r = E_SUCCESS;
NdefRecord* pNdefRecord = null;
- TryReturn(
- __type.GetNameFormat() != NDEF_TNF_EMPTY, E_INVALID_OPERATION,
- "[E_INVALID_OPERATION] The record type is NDEF_TNF_EMPTY.");
+ SysTryReturnResult(NID_NET_NFC, __type.GetNameFormat() != NDEF_TNF_EMPTY, E_INVALID_OPERATION, "The record type is NDEF_TNF_EMPTY.");
- TryReturn(id.GetLength() < 256, E_MAX_EXCEEDED, "[E_MAX_EXCEEDED] The length of the id should be less than 256.");
+ SysTryReturnResult(NID_NET_NFC, id.GetLength() < 256, E_MAX_EXCEEDED, "The length of the id should be less than 256.");
if (id.IsEmpty() == false)
{
AsciiEncoding ascii;
ByteBuffer* pBuff = ascii.GetBytesN(id);
r = GetLastResult();
- TryReturn(pBuff != null, E_INVALID_ENCODING_RANGE,
- "[E_INVALID_ENCODING_RANGE] Name contains characters outside US-ASCII range");
+ SysTryReturnResult(NID_NET_NFC, pBuff != null, E_INVALID_ENCODING_RANGE, "Name contains characters outside US-ASCII range");
delete pBuff;
// checks the uniqueness of id among all records in the NDEF message and return E_INVALID_ARG.
if (__pMessageImpl != null)
{
pNdefRecord = __pMessageImpl->GetRecord(id);
- TryReturn((pNdefRecord == null || pNdefRecord->__pImpl == this), E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument is used. The id already exists in the other records of the same NDEF message.");
+ SysTryReturnResult(NID_NET_NFC, (pNdefRecord == null || pNdefRecord->__pImpl == this), E_INVALID_ARG,
+ "Invalid argument is used. The id already exists in the other records of the same NDEF message.");
}
}
__id = id;
result r = E_SUCCESS;
unique_ptr<ByteBuffer> pTempPayload;
- TryReturn(__type.GetNameFormat() != NDEF_TNF_EMPTY, E_INVALID_OPERATION,
- "[E_INVALID_OPERATION] The record type is NDEF_TNF_EMPTY");
+ SysTryReturnResult(NID_NET_NFC, __type.GetNameFormat() != NDEF_TNF_EMPTY, E_INVALID_OPERATION, "The record type is NDEF_TNF_EMPTY");
pTempPayload.reset(new (std::nothrow) ByteBuffer());
- TryReturn(pTempPayload != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnResult(NID_NET_NFC, pTempPayload != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
// Propagates the result (E_SUCCESS or E_INVALID_ARG)
r = pTempPayload->Construct(payload);
AsciiEncoding ascii;
ByteBuffer* pBuff = null;
- TryReturn((__format != NDEF_TNF_EMPTY) && (__format != NDEF_TNF_UNKNOWN) && (__format != NDEF_TNF_ALL),
- E_INVALID_OPERATION, "[E_INVALID_OPERATION] The record type is NDEF_TNF_EMPTY or NDEF_TNF_UNKNOWN");
+ SysTryReturnResult(NID_NET_NFC, (__format != NDEF_TNF_EMPTY) && (__format != NDEF_TNF_UNKNOWN) && (__format != NDEF_TNF_ALL),
+ E_INVALID_OPERATION, " The record type is NDEF_TNF_EMPTY or NDEF_TNF_UNKNOWN");
- TryReturn(name.GetLength() < 256, E_MAX_EXCEEDED, "[E_MAX_EXCEEDED] The length of the name should be less than 256");
+ SysTryReturnResult(NID_NET_NFC, name.GetLength() < 256, E_MAX_EXCEEDED, "The length of the name should be less than 256");
if (name.IsEmpty())
{
{
// check if name includes non US-ASCII character or not
pBuff = ascii.GetBytesN(name);
- TryReturn(pBuff != null, E_INVALID_ENCODING_RANGE,
- "[E_INVALID_ENCODING_RANGE] Name contains characters outside US-ASCII range");
+ SysTryReturnResult(NID_NET_NFC, pBuff != null, E_INVALID_ENCODING_RANGE, "Name contains characters outside US-ASCII range");
delete pBuff;
isValid = _NdefMessageUtil::IsValidRecordType(__format, name);
- TryReturn(isValid == true, E_INVALID_FORMAT, "[E_INVALID_FORMAT] Invalid name");
+ SysTryReturnResult(NID_NET_NFC, isValid == true, E_INVALID_FORMAT, "Invalid name");
}
namespace Tizen { namespace Net { namespace Nfc
{
-
+typedef IMapEnumeratorT<String, String> _NfcCandidatesMapEnumerator;
_NfcIpcProxy* _NfcIpcProxy::__pSingleton = null;
_NfcIpcProxy::_NfcIpcProxy(void) :
}
result
-_NfcIpcProxy::SetLaunchPopupEnabled(bool enable) const
-{
- result r = E_SUCCESS;
- IPC::Message* pMessage = null;
- unsigned long ret = 0;
-
- pMessage = new (std::nothrow) ConnectivityNfcServiceMsg_setLaunchPopupEnabled(enable, &ret);
- SysTryReturnResult(NID_NET_NFC, pMessage != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
-
- r = __pIpcClient->SendRequest(*pMessage);
- delete pMessage;
- SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS && ret == E_SUCCESS, E_SYSTEM, "A system error occurred.");
-
- SysLog(NID_NET_NFC, "Setting the NFC popup enabled option through IPC is successful.");
-
- return ret;
-}
-
-result
_NfcIpcProxy::RegisterNdefPushMessage(const Tizen::Base::ByteBuffer& message, const Tizen::Base::String& description) const
{
result r = E_SUCCESS;
{
result r = E_SUCCESS;
IPC::Message* pMessage = null;
- unique_ptr<HashMap> pCandidates;
+ unique_ptr<HashMap> pCandidatesHashMap;
+ unique_ptr<_StringMap> pCandidates;
+ unique_ptr<String> pAppPkgId;
+ unique_ptr<String> pMsgDesc;
unsigned long ret = 0;
- pCandidates.reset(new (std::nothrow) HashMap(SingleObjectDeleter));
+ pCandidates.reset(new (std::nothrow) _StringMap());
SysTryReturn(NID_NET_NFC, pCandidates != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- pCandidates->Construct();
+ pCandidatesHashMap.reset(new (std::nothrow) HashMap(SingleObjectDeleter));
+ SysTryReturn(NID_NET_NFC, pCandidatesHashMap != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ pCandidatesHashMap->Construct();
pMessage = new (std::nothrow) ConnectivityNfcServiceMsg_getReservedPushCandidates(pCandidates.get(), &ret);
SysTryReturn(NID_NET_NFC, pMessage != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
SysLog(NID_NET_NFC, "Getting the Reserved Push candidate list through IPC is successful.");
- return pCandidates.release();
+ unique_ptr<_NfcCandidatesMapEnumerator> pCandidatesEnum(pCandidates->GetMapEnumeratorN());
+
+ while (pCandidatesEnum->MoveNext() == E_SUCCESS)
+ {
+ pAppPkgId.reset(new (std::nothrow) String());
+ SysTryReturn(NID_NET_NFC, pAppPkgId != null, null, E_OUT_OF_MEMORY, "Memory allocation failed.");
+
+ pMsgDesc.reset(new (std::nothrow) String());
+ SysTryReturn(NID_NET_NFC, pMsgDesc != null, null, E_OUT_OF_MEMORY, "Memory allocation failed.");
+
+ pCandidatesEnum->GetKey(*pAppPkgId);
+ pCandidatesEnum->GetValue(*pMsgDesc);
+ pCandidatesHashMap->Add(pAppPkgId.release(), pMsgDesc.release());
+ }
+
+ return pCandidatesHashMap.release();
}
result
*/
result InitializeNfc(void) const;
- /**
- * Sets the enabling option of NFC Conditional Launch Popup through IPC.
- *
- * @return An error code
- * @param[in] enable Set to @c true to enable the Conditional NFC App Launch pop-up, @n
- * @c else false
- * @exception E_SUCCESS The method was successful.
- * @exception E_SYSTEM A system error occurred.
- */
- result SetLaunchPopupEnabled(bool enable) const;
-
/**
* Registers an NDEF message to be pushed through IPC.
*
#include "FNetNfc_NdefMessageUtil.h"
#include "FNetNfc_NfcTagImpl.h"
#include "FNetNfc_TagConnectionImpl.h"
-#include "FNetNfc_NfcAuthorityController.h"
#include "FNetNfc_NfcSystemAdapter.h"
#include "FNetNfc_NfcDeviceDiscoveryEvent.h"
#include "FNetNfc_NfcDeviceDiscoveryEventArg.h"
_NfcManagerImpl::SetLaunchPopupEnabled(bool enable)
{
result r = E_SYSTEM;
- _NfcAuthorityController* pController = null;
-
- pController = _NfcAuthorityController::GetInstance();
-
- if (pController)
- {
- r = pController->SetLaunchPopupEnabled(enable);
- }
+ r = _NfcSystemAdapter::GetInstance()->SetLaunchPopupEnabled(enable);
SysTryReturn(NID_NET_NFC, r == E_SUCCESS, r, r, "[%s] error occurred on %s the launch popup.",
GetErrorMessage(r), enable ? "enabling" : "disabling");
#include <FBaseSysLog.h>
#include <FBaseColLinkedListT.h>
#include <FNetNfcNdefMessage.h>
+#include "FNetNfc_NfcIpcProxy.h"
#include "FNetNfc_NfcSystemAdapter.h"
#include "FNetNfc_NfcTagImpl.h"
#include "FNetNfc_NdefMessageUtil.h"
, __tagHandle(null)
, __p2pTargetHandle(null)
, __isConnected(false)
+ , __pIpcProxy(null)
{
}
SysTryReturnResult(NID_NET_NFC, res == NFC_ERROR_NONE, E_SYSTEM, "Failed to initialize the NFC from the result.");
SysLog(NID_NET_NFC, "nfc_manager_initialize_sync() is invoked successfully.");
+ __pIpcProxy = _NfcIpcProxy::GetInstance();
+ SysTryReturnResult(NID_NET_NFC, __pIpcProxy != null, E_SYSTEM, "Failed to create _NfcIpcProxy.");
+
+ r = __pIpcProxy->InitializeNfc();
+ SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, E_SYSTEM,
+ "Failed to initialize the NFC service of osp-connectivity-service.");
+
// set the response callback
nfc_manager_set_activation_changed_cb(&OnNfcActivationChanged, this);
nfc_manager_set_tag_discovered_cb(&OnNfcTagDiscovered, this);
result r = E_SUCCESS;
int res = NFC_ERROR_NONE;
nfc_ndef_message_h ndefMessageH = NULL;
- int length = 0;
+ unsigned int length = 0;
// convert NdefMessage to ByteBuffer
unique_ptr<ByteBuffer> pByteBuffer(message.ToByteBufferN());
int res = NFC_ERROR_NONE;
result r = E_SUCCESS;
nfc_ndef_message_h ndefMessageH = NULL;
- int length = 0;
+ unsigned int length = 0;
// convert NdefMessage to ByteBuffer
unique_ptr<ByteBuffer> pByteBuffer(message.ToByteBufferN());
return E_SUCCESS;
}
+result
+_NfcSystemAdapter::SetLaunchPopupEnabled(bool enable)
+{
+ int res = NFC_ERROR_NONE;
+ result r = E_SUCCESS;
+
+ res = nfc_manager_set_system_handler_enable(enable);
+ _NfcConvertErrorResult(res != NFC_ERROR_NONE, r, E_SYSTEM);
+ SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to %s system handler. [0x%08X]", enable ? "enabling" : "disabling", res);
+
+ return r;
+}
+
void
_NfcSystemAdapter::OnNfcActivationCompleted(nfc_error_e error, void* pUserData)
{
int res = NFC_ERROR_NONE;
result r = E_SUCCESS;
byte* pTempBuffer = null;
- int bufSize = 0;
+ unsigned int bufSize = 0;
ByteBuffer byteMessage;
ClearLastResult();
class _NfcManagerImpl;
class _TagConnectionImpl;
class _NdefPushManagerImpl;
+class _NfcIpcProxy;
/**
* @class _NfcSystemAdapter
*/
result Push(const NdefMessage& message);
+ /**
+ * Enables or disables the Conditional NFC App Launch pop-up.
+ *
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM A system error has occurred.
+ */
+ result SetLaunchPopupEnabled(bool enable);
/**
* Callback to notify that the NFC activation or deactivation is completed.
nfc_p2p_target_h __p2pTargetHandle;
bool __isConnected; // TODO: temporary defined due to get the current tag connection state.
static _NfcSystemAdapter* __pSingleton;
+ _NfcIpcProxy* __pIpcProxy;
friend class std::default_delete< _NfcSystemAdapter >;
}; // _NfcSystemAdapter
// Client -> Server (sync)
IPC_SYNC_MESSAGE_CONTROL0_1(ConnectivityNfcServiceMsg_initialize, unsigned long /* result */)
-IPC_SYNC_MESSAGE_CONTROL1_1(ConnectivityNfcServiceMsg_setLaunchPopupEnabled, bool /* enable */, unsigned long /* result */)
IPC_SYNC_MESSAGE_CONTROL2_1(ConnectivityNfcServiceMsg_registerPushMessage, Tizen::Base::ByteBuffer /* message */, Tizen::Base::String /* description */, unsigned long /* result */)
IPC_SYNC_MESSAGE_CONTROL0_1(ConnectivityNfcServiceMsg_unregisterPushMessage, unsigned long /* result */)
IPC_SYNC_MESSAGE_CONTROL0_1(ConnectivityNfcServiceMsg_activateReservedPush, unsigned long /* result */)
IPC_SYNC_MESSAGE_CONTROL0_1(ConnectivityNfcServiceMsg_deactivateReservedPush, unsigned long /* result */)
IPC_SYNC_MESSAGE_CONTROL0_1(ConnectivityNfcServiceMsg_isReservedPushActivated, bool /* isActivated */)
-IPC_SYNC_MESSAGE_CONTROL0_2(ConnectivityNfcServiceMsg_getReservedPushCandidates, Tizen::Base::Collection::HashMap /* candidates */, unsigned long /* result */)
+IPC_SYNC_MESSAGE_CONTROL0_2(ConnectivityNfcServiceMsg_getReservedPushCandidates, Tizen::Io::_StringMap /* candidates */, unsigned long /* result */)
IPC_SYNC_MESSAGE_CONTROL1_1(ConnectivityNfcServiceMsg_pickReservedPushMessage, Tizen::Base::String /* appId */, unsigned long /* result */)
IPC_SYNC_MESSAGE_CONTROL0_2(ConnectivityNfcServiceMsg_getPickedReservedPushMessage, Tizen::Base::String /* appId */, unsigned long /* result */)