/* * libslp-sysman * * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. * * Contact: DongGi Jang * * 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.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, * 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. * */ #ifndef ___SYSMAN_MANAGED___ #define ___SYSMAN_MANAGED___ #include /** * @file sysman_managed.h * @ingroup libsysman System Manager library * @brief This library provides APIs related with memory, performance, processes, and so on. * @author SLP2.0 * @date 2010-01-24 * @version 0.1 */ /** * @fn int sysman_get_pid(const char *execpath) * @brief This API is used to get the pid of the process which has the specified execpath.\n * Internally, this API searches /proc/{pid}/cmdline and compares the parameter execpath with 1st argument of cmdline. \n * If there is no process that has same execpath in /proc/{pid}/cmdline, it will return -1. * @param[in] execpath program path which you want to know whether it is run or not * @return pid when the program is running, -1 if it is not. */ int sysman_get_pid(const char *execpath); /** * @fn int sysman_set_datetime(time_t timet) * @brief This API is used to set date time.\n * Internally, this API call predefined action API. That is send a notify message. \n * @param[in] time_t type of time which you want to set. * @return pid when the program is running, -1 if param is less than 0 or when failed set datetime. */ int sysman_set_datetime(time_t timet); #endif /* ___SYSMAN_MANAGED___ */