3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 #ifndef FW_MAINLOOP_H_
19 #define FW_MAINLOOP_H_
23 #endif /* __cplusplus */
27 * @brief Provides main-loop manipulation functionality
30 /** @addtogroup utility
35 * API to create and run the main loop
41 sync_agent_run_main_loop(use_thread);
45 * @param[in] use_thread 1 creating thread to run the main loop, otherwise (run the main loop on same thread) 0
50 * @see sync_agent_run_main_loop(int)
53 void sync_agent_run_main_loop(int use_thread);
56 * API to stop the main loop which is running currently
62 sync_agent_run_main_loop(use_thread);
64 sync_agent_stop_main_loop(use_thread);
68 * @param[in] use_thread same parameter value used at sync_agent_run_main_loop()
73 * @see sync_agent_stop_main_loop(int)
76 void sync_agent_stop_main_loop(int use_thread);
79 * API to get the main loop object
83 GMainLoop *loop = NULL;
85 loop = (GMainLoop *)sync_agent_get_main_loop();
89 * @return main loop object which is running currently on success, NULL on error
94 * @see sync_agent_get_main_loop()
97 void *sync_agent_get_main_loop();
105 #endif /* __cplusplus */
106 #endif /* FW_MAINLOOP_H_ */