tizen 2.3.1 release
[apps/home/minicontrol.git] / include / minicontrol-monitor.h
index 794a3d7..fc86817 100755 (executable)
@@ -1,14 +1,14 @@
 /*
- * Copyright 2012  Samsung Electronics Co., Ltd
+ * Copyright (c)  2013-2015 Samsung Electronics Co., Ltd All Rights Reserved
  *
- * Licensed under the Flora License, Version 1.0 (the "License");
+ * Licensed under the Apache License, Version 2.0 (the License);
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *  http://www.tizenopensource.org/license
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
+ * distributed under the License is distributed on an AS IS BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
 
 #include <minicontrol-error.h>
 #include <minicontrol-type.h>
+#include <minicontrol-handler.h>
 
-/**
- * @defgroup MINICONTROL_MONITOR_LIBRARY minicontrol monitor library
- * @brief This minicontrol monitor library used to manage events triggered by minicontrol provider
- */
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 /**
- * @ingroup MINICONTROL_MONITOR_LIBRARY
- * @defgroup MINICONTROL_MONITOR_LIBRARY_TYPE minicontrol monitor library type
- * @brief minicontrol monitor library type
+ * @file minicontrol-monitor.h
+ * @brief This minicontrol monitor library used to manage events triggered by minicontrol provider.
  */
 
 /**
- * @addtogroup MINICONTROL_MONITOR_LIBRARY_TYPE
+ * @addtogroup MINICONTROL_MONITOR_MODULE
  * @{
  */
 
   /**
- * @brief Called when event is triggered
+ * @brief Called when event is triggered.
  * @param[in] action The type of fired event
  * @param[in] name The name of provider
  * @param[in] width The width of provider
  * @param[in] height The height of provider
  * @param[in] priority The priority of provider
- * @param[in] data user data
- * @pre minicontrol_monitor_start() used to register this callback
+ * @param[in] data User data
+ * @pre minicontrol_monitor_start() used to register this callback.
  * @see #minicontrol_action_e
  * @see #minicontrol_priority_e
  */
@@ -54,26 +53,42 @@ typedef void (*minicontrol_monitor_cb) (minicontrol_action_e action,
                                        unsigned int height,
                                        minicontrol_priority_e priority,
                                        void *data);
+typedef void (*minicontrol_monitor_with_handler_cb) (minicontrol_action_e action,
+                                       const char *name,
+                                       unsigned int width,
+                                       unsigned int height,
+                                       minicontrol_priority_e priority,
+                                       minicontrol_h handler,
+                                       void *data);
 
 /**
- * @addtogroup MINICONTROL_MONITOR_LIBRARY
- * @{
+ * @brief Registers a callback for events originated by minicontrol provider.
+ * @param[in] callback Callback function
+ * @param[in] data User data
  */
+minicontrol_error_e minicontrol_monitor_start(minicontrol_monitor_cb callback,
+                                       void *data);
 
 /**
  * @brief Register a callback for events originated by minicontrol provider
  * @param[in] callback callback function
  * @param[in] data user data
  */
-minicontrol_error_e minicontrol_monitor_start(minicontrol_monitor_cb callback,
-                                       void *data);
-
+minicontrol_error_e minicontrol_monitor_start_with_handler(
+                               minicontrol_monitor_with_handler_cb callback, void *data);
 /**
- * @brief Unregister a callback for events originated by minicontrol provider
+ * @brief Unregisters a callback for events originated by minicontrol provider.
  * @return #MINICONTROL_ERROR_NONE if success, other value if failure
  * @see #minicontrol_error_e
  */
 minicontrol_error_e minicontrol_monitor_stop(void);
 
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
 #endif /* _MINICTRL_MONITOR_H_ */