tizen_2.0_build
[platform/core/system/libslp-sysman.git] / sysman_managed.h
1 /*
2  *  libslp-sysman
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: DongGi Jang <dg0402.jang@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20 */
21
22
23 #ifndef ___SYSMAN_MANAGED___
24 #define ___SYSMAN_MANAGED___
25
26 #include <sys/time.h>
27
28 /**
29  * @file        sysman_managed.h
30  * @ingroup     libsysman System Manager library
31  * @brief       This library provides APIs related with memory, performance, processes, and so on.
32  * @author      SLP2.0
33  * @date        2010-01-24
34  * @version     0.1
35  */
36
37 /**
38  * @fn int sysman_get_pid(const char *execpath)
39  * @brief This API is used to get the pid of the process which has the specified execpath.\n
40  *              Internally, this API searches /proc/{pid}/cmdline and compares the parameter execpath with 1st argument of cmdline. \n
41  *              If there is no process that has same execpath in /proc/{pid}/cmdline, it will return -1.
42  * @param[in] execpath program path which you want to know whether it is run or not
43  * @return pid when the program is running, -1 if it is not.
44  */
45         int sysman_get_pid(const char *execpath);
46
47 /**
48  * @fn int sysman_set_datetime(time_t timet)
49  * @brief This API is used to set date time.\n
50  *              Internally, this API call predefined action API. That is send a notify message. \n
51  * @param[in] time_t type of time which you want to set.
52  * @return pid when the program is running, -1 if param is less than 0 or when failed set datetime.
53  */
54         int sysman_set_datetime(time_t timet);
55
56 #endif /* ___SYSMAN_MANAGED___ */