//
-// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the License);
* @file FBaseRtEvent.h
* @brief This is the header file for the %Event class.
*
- * This file contains the declarations of the %Event class.
+ * This header file contains the declarations of the %Event class.
*/
#ifndef _FBASE_RT_EVENT_H_
class IEventListener;
/**
* @class Event
-* @brief This class provides methods for delivering an event with an argument synchronously and asynchronously.
+* @brief This class provides methods for notifying events with arguments to its listeners.
* @since 2.0
*
+* The %Event class provides methods for notifying events with arguments to its listeners.
+* Because it is bounded to either a default thread or an event-driven thread, it cannot be created on a worker thread.
+* It supports two types of listeners; one is called on the thread where the event is fired, and another is called on the thread where the listener is registered.
+*
* @code
*
* #include <FBase.h>
* @since 2.0
*
* @return An error code
- * @param[in] listener Listener to add
- * @param[in] calledByCallerThread true, to call the listener on the caller thread of this method
- * false, to call the listener on the thread in which the event is fired.
- * @exception E_SUCCESS This method is successful.
+ * @param[in] listener The listener to add
+ * @param[in] calledByCallerThread Set to @c true, to call the listener on the caller thread of this method, @n
+ * else @c false, to call the listener on the thread in which the event is fired.
+ * @exception E_SUCCESS The method is successful.
* @exception E_OBJ_ALREADY_EXIST The listener already exists.
- * @exception E_INVALID_OPERATION calledByCallerThread is set to true but the caller thread is a worker thread.
+ * @exception E_INVALID_OPERATION The specified @c calledByCallerThread is @c true but the caller thread is a worker thread.
*/
result AddListener(IEventListener& listener, bool calledByCallerThread = true);
* @since 2.0
*
* @return An error code
- * @param[in] listener Listener to remove
- * @exception E_SUCCESS This method is successful.
- * @exception E_OBJ_NOT_FOUND The listener is not found.
+ * @param[in] listener The listener to remove
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OBJ_NOT_FOUND The listener has not been found.
*/
result RemoveListener(IEventListener& listener);
* @since 2.0
*
* @return An error code
- * @param[in] arg The event argument.
- * @exception E_SUCCESS This method is successful.
- * @exception E_INVALID_STATE This event has not been initialized.
+ * @param[in] arg The event argument
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_STATE This event has not been initialized.
*
- * @remark This takes the ownership of @c arg. So arg should be created on a heap and should not be deleted by caller.
+ * @remarks This takes the ownership of @c arg. @n
+ * So @c arg should be created on a heap and should not be deleted by caller.
*/
result Fire(IEventArg& arg);
* @param[in] listener The listener instance which is currently processing
* @param[in] arg The event argument that is fired
*
- * @remark A derived class must override this method.
+ * @remarks A derived class must override this method.
*/
virtual void FireImpl(IEventListener& listener, const IEventArg& arg) = 0;