diff options
author | HyungKyu Song <hk76.song@samsung.com> | 2013-02-16 00:11:23 +0900 |
---|---|---|
committer | HyungKyu Song <hk76.song@samsung.com> | 2013-02-16 00:11:23 +0900 |
commit | 671420af760d687ad2733350e60030b01ce0acab (patch) | |
tree | 438e08b4318944be6100776507a3a1f995c5dbc2 /include | |
parent | 3c3bbff9cf730ba88560139c8362e61d6f9ac0bf (diff) | |
download | aul-1-tizen_2.0.tar.gz aul-1-tizen_2.0.tar.bz2 aul-1-tizen_2.0.zip |
Diffstat (limited to 'include')
-rwxr-xr-x | include/SLP_AUL_PG.h | 474 | ||||
-rwxr-xr-x | include/app_signal.h | 35 | ||||
-rwxr-xr-x | include/app_sock.h | 72 | ||||
-rwxr-xr-x | include/aul.h | 1595 | ||||
-rwxr-xr-x | include/aul_api.h | 25 | ||||
-rwxr-xr-x | include/aul_service.h | 84 | ||||
-rwxr-xr-x | include/aul_util.h | 51 | ||||
-rwxr-xr-x | include/key.h | 28 | ||||
-rwxr-xr-x | include/launch.h | 49 | ||||
-rwxr-xr-x | include/menu_db_util.h | 231 | ||||
-rwxr-xr-x | include/mida.h | 51 | ||||
-rwxr-xr-x | include/miregex.h | 39 | ||||
-rwxr-xr-x | include/perf.h | 68 | ||||
-rwxr-xr-x | include/pg-doxy/doxygen.conf | 850 | ||||
-rwxr-xr-x | include/pg-doxy/pg-doxy.sh | 39 | ||||
-rw-r--r-- | include/pg-doxy/slp_doxy.css | 699 | ||||
-rwxr-xr-x | include/pg-doxy/tool/bin/doxygen | bin | 0 -> 6075840 bytes | |||
-rwxr-xr-x | include/pg-doxy/tool/bin/doxytag | bin | 0 -> 301465 bytes | |||
-rw-r--r-- | include/pg-doxy/tool/man/man1/doxygen.1 | 46 | ||||
-rw-r--r-- | include/pg-doxy/tool/man/man1/doxytag.1 | 21 | ||||
-rwxr-xr-x | include/simple_util.h | 89 |
21 files changed, 4546 insertions, 0 deletions
diff --git a/include/SLP_AUL_PG.h b/include/SLP_AUL_PG.h new file mode 100755 index 00000000..60fe4081 --- /dev/null +++ b/include/SLP_AUL_PG.h @@ -0,0 +1,474 @@ +/* + * aul + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com> + * + * 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. + * + */ + + +/** + + * + * @ingroup SLP_PG + * @defgroup AUL Application Utility Library + + +@par AUL Programming Guide + +<h1 class="pg"> Introduction</h1> +<h2 class="pg"> Purpose of this document</h2> +The purpose of this document is to describe how applications can use Application Utility Library APIs.\n +This document gives only programming guidelines to application engineers. + +<h2 class="pg"> Scope</h2> +The scope of this document is limited to Samsung platform Application Utility Library API usage. +@} + +@defgroup AUL_Architecture 1.Architecture +@ingroup AUL +@{ +<h1 class="pg">Application Utility Library Architecture</h1> +<h2 class="pg"> Architecture overview</h2> +Application Utility Library (AUL) is responsible for launching / resuming / terminating application. It support low-level API for it. AUL also support high-level API to launch default applications based on MIME types and URI(based on regular expression). It also provides the information of applications that are running.\n + +In single instance model, if a currently running application is requested to be launched again, the AUL sends the reset event to the application. \n + +Low-level AUL API(primitive APIs) expects the application to provide APN(application package name) it wishes to launch.\n Low-level interface used by AUL are as shown below. Unix Domain Socket is used to send events between launchpad deamon and applications. +Launchpad deamon is responsible for setup default configuration of application like "setup authority", " setup application scale",... DB is used to store / retain default configuration of application. + +@image html low-level2.png "Low-level AUL diagram" + +High-level APIs support to launch based on MIME types(based on filename, URI, service name). This feature is abstraction of APN. Most develpers want to launch based on filename, URI, service name without knowing APN. Below is example list. + - When developer open browser appliction with "http://www.samsung.com". + - When developer open application with filename "/usr/share/myimage.png" + - When developer launching application with service name "camera" and service command "take_picture" + +Internally, AUL finds MIME type with given filename, URI, service name. Next, AUL find APN of default application from DB with associated MIME type. and then, AUL launch the application using primitive AUL APIs. + +@image html high-level2.png "High-Level AUL diagram" +@} + +@defgroup AUL_Feature 2.Feature +@ingroup AUL +@{ +<h2 class="pg">Application Utility Library Features</h2> +Application Utility Library has the following features:\n + + - Launch/Resume/Terminate Application (Primitive APIs) + - It can launch an application that is not currently running. + - It sends reset/resume/terminate event if application is already running + + - Application List or information + - It provides the list of applications that are running. + - It provides information of running applications + + - MIME support (High-Level APIs) + - AUL can get MIME type associated with the file and content + - AUL can get the default application associated with the MIME type. + - AUL can launch default applications associated with the MIME(file or content) when AUL find default application. + - AUL automatically launch "application selection popup" when AUL don't find default application associated with the MIME(file or content) + + - Application Service support (High-Level APIs) + - AUL can launch applications based on service name and service command +@} + +@defgroup AUL_Use_Cases1 Launch/Resume/Terminate an Application +@ingroup AUL_Use_Cases +@{ +<h1 class="pg"> AUL features with sample code</h1> + +<h2 class="pg"> Launch/Resume/Terminate an application</h2> + +Caller application +- LAUNCH or RESET request without return callback function +- The first parameter(pkg_name) has to be registered through .desktop file. +- The second parameter(bundle) give dictionary style's arguments to launched(callee) application. + +@code +// the package name of this app is a "org.tizen.caller" +#include <aul.h> +#include <bundle.h> +void launch_func() +{ + bundle* kb; + kb = bundle_create(); + bundle_add(kb, "key1", "val1"); + bundle_add(kb, "key2", "val2"); + bundle_add(kb, "key3", "val3"); + aul_launch_app("org.tizen.callee",kb); + bundle_free(kb); +} +@endcode + +- Return the application to the foreground +- You might want to use aul_open_app when you need to resume, + e.g., get it back to foreground, an application +- If the application is not running, the application will be launched. + +@code +// the package name of this app is a "org.tizen.caller" +#include <aul.h> +void resume_func() +{ + aul_open_app("org.tizen.callee"); +} +@endcode + + +Callee application + +- Integated with Appcore +- If you use Appcore Library, Aul library already was integrated.\n + You must implementation Appcore RESET , RESUME, TERMINATE handler.\n + This is example code. This is NOT guidance \n +- If you want more information,SEE for AppCore document. + +@code +//Callee application with AppCore + +#include <aul.h> +#include <appcore-efl.h> +#include <bundle.h> + : + +static int app_create(void *data) +{ + // initialize your app without argument + return 0; +} + +static void _app_initialize_with_arg(bundle *b) +{ + // initialize your app with argument +} + +// +// called by window manager event +// or called by aul_open_app +// create your resume handler +// +static int app_resume(void *data){return 0;} +static int app_pause(void *data) {return 0;} + +// +// called by aul_terminate_api +// +static int app_terminate(void *data){return 0;} + +// +// called by aul_launch_app or aul_launch_api_with_result +// this is example code. create your reset handler +// +static int app_reset(bundle *b, void *data) +{ + char* mime_type; + if(bundle_get_val(ad->kb, AUL_K_ARGV0)) // when launch + _app_initialize_with_arg(b); + else{ // when receiving reset event + mime_type = bundle_get_val(b, AUL_K_MIME_TYPE); + if (!mime_type){ + elm_win_activate(..); + return 0; + }else{ + update_list(mime_type); + } + } +} + +int main(int argc, char *argv[]) +{ + struct appcore_ops ops = { + .create = app_create, + .terminate = app_terminate, + .pause = app_pause, + .resume = app_resume, + .reset = app_reset, + }; + + return appcore_efl_main(PACKAGE, &argc, &argv, &ops); +} +@endcode + + +- SET with AUL native handler +- In special case, if you don't use Appcore library, this is aul callee's example + +@code +// Callee application +#include <aul.h> +#include <bundle.h> +#include <Ecore.h> + +static int aul_handler(aul_type type, bundle *kb,void* data) +{ + char* val1, *val2 + switch(type){ + case AUL_START: + // same to Appcore RESET callback + val1 = bundle_get_val(kb, "phone_number"); + val2 = bundle_get_val(kb, "store"); + break; + case AUL_RESUME: + // same to Appcore RESUME callback + break; + case AUL_TERMINATE: + // same to Appcore TERMINATE callback + break; + } + return 0; +} + +int main(int argc, char** argv) +{ + ecore_init(); + + aul_launch_init(aul_handler,NULL); + // enable this if you want to handle at aul_handler when launch + aul_launch_argv_handler(argc, argv); + + ecore_main_loop_begin(); // You must need ecore or glib mainloop + return 0; +} +@endcode +@} + +@defgroup AUL_Use_Cases2 Get Running Application State +@ingroup AUL_Use_Cases +@{ +<h2 class="pg"> Get Running Application State </h2> + +- Getting running application list +- This AUL function is used to get the list of all the applications that are currently running. + +@code +#include <aul.h> + +int iterfunc(const aul_app_info* info, void* data) +{ + printf("package name: %s\n", info->pkg_name); + printf("running pid: %d\n", info->pid); + printf("application executable path: %s\n", info->app_path); + return 0; +} + +int main (int argc, char **argv) +{ + aul_app_get_running_app_info(iterfunc,NULL); +} +@endcode + +- Get application running state +- This AUL function is used to get application's state + +@code +#include <aul.h> + +int main (int argc, char **argv) +{ + if(aul_app_is_running("org.tizen.app2")) + printf("application is running"); +} +@endcode + +- Dead Handler (Set dead handler) +- aul_listen_app_dead_signal track killed application. + For example, 3rd party application can register indicator icon at indicator service. When 3rd party application abnormally terminated after set icon at indicator, indicator service should collect garbage icon set by the application. + +@code +#include <aul.h> + +int dead_tracker(int pid, void* data) +{ + printf("the application with %d pid was killed",pid); + return 0; +} + +void set_dead_handler_func() +{ + aul_listen_app_dead_signal(dead_tracker,NULL); +} +@endcode +@} + +@defgroup AUL_Use_Cases3 Launch Based on Mime Type +@ingroup AUL_Use_Cases +@{ +<h2 class="pg"> High Level APIs - launch based on mime type(filename, URI) </h2> + +- These AUL functions are used to launch the default application associated with the specified MIME extension. In addition, AUL provides functions to set/get the default application (package name) associated with a MIME type and functions to retrieve the MIME type associated with a specific file. + +- AUL launch default application associated with filename or url(or content) + +- AUL automatically launch "application selection popup" when AUL doesn't find default application.\n + App-Selector(application selection popup) shows list of application to process the file(or content).\n + User can select application from the list and open file with the application.\n + User can determine whether the selected application is set as default application or not.\n + If App-Selector doesn't find any application to process the file, App-Selector will show "Cannot get mimetype" or "Cannot find default application". + +@code +// the package name of this app is a "org.tizen.caller" +#include <aul.h> +void func1(char* filename) +{ + aul_open_file(filename); +} + +void func2(char* content) +{ + aul_open_content(content); +} + +int main (int argc, char **argv) +{ + // launch the application to process 3gp.3gp file + func1("/opt/media/Videos/3gp.3gp"); + // launch the application to process "http://www.samsung.com" + func2("http://www.samsung.com"); +} +@endcode + +- We support primitive APIs for MIME operation + - aul_get_mime_from_content + - aul_get_mime_from_file + - aul_get_defapp_from_mime + - aul_set_defapp_with_mime + +This is example to launch MIME default applications using primitive APIs + +@code +// the package name of this app is a "org.tizen.caller" + +#include <aul.h> +#include <bundle.h> + +int main (int argc, char **argv) +{ + int ret; + char mimetype[128]; + char defapp[128]; + bundle *kb; + + // get MIME type of "3gp.3gp" + if( aul_get_mime_from_file("3gp.3gp",mimetype,sizeof(mimetype)) <0) + return -1; + printf("3gp.3gp's mime type is %s",mimetype); + + // get default application of the mimetype + if( aul_get_defapp_from_mime(mimetype,defapp,sizeof(defapp)) < 0) + return -1; + printf("%s types default application is %s\n", mimetype, defapp); + + // Launch the default application with specific mime key + kb = bundle_create(); + bundle_add(kb, AUL_K_MIME_TYPE, mimetype); + bundle_add(kb, AUL_K_MIME_CONTENT, "3gp.3gp"); + aul_launch_app(defapp, kb); + bundle_free(kb); +} +@endcode + + +- In callee, if you want to process specific MIME type + First, you must add mimetype field at desktop file + Second, you must process special key "AUL_K_MIME_TYPE", "AUL_K_MIME_CONTENT" + +@code +// the package name of this app is a "org.tizen.callee" +#include <aul.h> +#include <bundle.h> + +// AppCore Reset Handler +static int app_reset(bundle *b, void *data) +{ + char* mime_type; + + mime_type = bundle_get_val(b, AUL_K_MIME_TYPE); + if (!mime_type) + return 0; + else + process_mime(mime_type, bundle_get_val(AUL_K_MIME_CONTENT)); +} +@endcode +@} + +@defgroup AUL_Use_Cases4 Launch Based on Service Name and Command +@ingroup AUL_Use_Cases +@{ +<h2 class="pg"> High Level APIs - launch based on service name and command </h2> + +- This AUL functions is used to launch default application based on service name and service command. In addition,AUL package support to set/get default application(package name) associated with service name and service command. This APIs also support to receive result from launched(requested) application. + +- Launch default application associated with service name and service command. +- You can use aul_open_service when you launch an application associated with service name and service command +- If the service support to receive result, you can add result callback function. +- the API is asynchronous.(non-blocking API) + +@code +// the package name of this app is a "org.tizen.caller" +#include <aul.h> +#include <bundle.h> +void cb_func( bundle* kb, int reserved, void* data) +{ + char *id; + id = bundle_get_val(kb, "searched_id"); + printf("searched id %s", id); +} + +void service_launch_func() +{ + void* user_data; + bundle* kb; + + user_data = (void*)strdup("my_priv_data"); + kb = bundle_create(); + bundle_add(kb, "storage_type", "SIM"); + aul_open_appsvc("contact", "search", kb, cb_func, user_data); + bundle_free(kb); +} +@endcode + +- This is sample code to send result to caller in application(callee) given the service. +- aul_send_service_result send result msg based on received bundle. + +@code +// Callee application +// the package name of this app is a "org.tizen.callee" + +#include <aul.h> +#include <bundle.h> + +void send_result(bundle *recved_bundle, char* id) +{ + bundle* res_kb; + aul_create_result_bundle(recved_bundle,&res_kb); + bundle_add(res_kb, "searched_id", id); + aul_send_service_result(res_kb); + bundle_free(res_kb); +} +@endcode +@} + +*/ + +/** +@addtogroup AUL +@{ + @defgroup AUL_Use_Cases Use Cases +@} +*/ + + diff --git a/include/app_signal.h b/include/app_signal.h new file mode 100755 index 00000000..b30cb51b --- /dev/null +++ b/include/app_signal.h @@ -0,0 +1,35 @@ +/* + * aul + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com> + * + * 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 __APP_DBUS_H__ +#define __APP_DBUS_H__ + +#include <glib.h> +#include <dbus/dbus.h> +#include <dbus/dbus-glib-lowlevel.h> + +#define AUL_DBUS_PATH "/aul/dbus_handler" +#define AUL_DBUS_SIGNAL_INTERFACE "org.tizen.aul.signal" +#define AUL_DBUS_APPDEAD_SIGNAL "app_dead" +#define AUL_DBUS_APPLAUNCH_SIGNAL "app_launch" + +#endif diff --git a/include/app_sock.h b/include/app_sock.h new file mode 100755 index 00000000..5689e2a3 --- /dev/null +++ b/include/app_sock.h @@ -0,0 +1,72 @@ +/* + * aul + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com> + * + * 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 __APP_PKT_H_ +#define __APP_PKT_H_ + +#include <unistd.h> +#define __USE_GNU +#include <sys/socket.h> +#include <linux/un.h> + +enum app_cmd { + APP_START, + APP_OPEN, + APP_RESUME, + APP_RESUME_BY_PID, + APP_TERM_BY_PID, + APP_RESULT, + APP_START_RES, + APP_CANCEL, + APP_KILL_BY_PID, + APP_ADD_HISTORY, + APP_RUNNING_INFO, + APP_RUNNING_INFO_RESULT, + APP_IS_RUNNING, + APP_KEY_EVENT, + APP_KEY_RESERVE, + APP_KEY_RELEASE, + APP_STATUS_UPDATE, + APP_RELEASED, + APP_RUNNING_LIST_UPDATE +}; + +#define AUL_SOCK_PREFIX "/tmp/alaunch" +#define AUL_SOCK_MAXBUFF 65535 +#define LAUNCHPAD_PID -1 +#define WEB_LAUNCHPAD_PID -3 +#define ELOCALLAUNCH_ID 128 + +typedef struct _app_pkt_t { + int cmd; + int len; + unsigned char data[1]; +} app_pkt_t; + +int __create_server_sock(int pid); +int __create_client_sock(int pid); +int __app_send_raw(int pid, int cmd, unsigned char *kb_data, int datalen); +app_pkt_t *__app_recv_raw(int fd, int *clifd, struct ucred *cr); +app_pkt_t *__app_send_cmd_with_result(int pid, int cmd); + +#endif + diff --git a/include/aul.h b/include/aul.h new file mode 100755 index 00000000..3f1b14bc --- /dev/null +++ b/include/aul.h @@ -0,0 +1,1595 @@ +/* + * aul + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com> + * + * 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 __AUL_H__ +#define __AUL_H__ + +#include <errno.h> +#include <bundle.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @mainpage + * + * This is new version of Application Utility Library + * + * Almost function's input param is application package name(APN).\n + * APN is application package name which is set by developer.\n + * In case of in-house application, prefix is org.tizen.\n + * It is different from debian package name.\n + * + * - Debian Package Name : Name which is managed by package manager + * - Application Package Name : Name which is used by AUL + * - Execution Path : real program executable path + */ + +/** + * @open + * @ingroup APPLICATION_FRAMEWORK + * @defgroup aul Application Utility Library + * @{ + */ + + +/** + * @file aul.h + * @brief Application Utility Library header + * + * Patched by Knhoon Baik <knhoon.baik@samsung.com> + * Patched by Youmin Ha <youmin.ha@samsung.com> + */ + +/** + * @addtogroup aul + * @{ + */ + +/** + * @brief Return values in AUL. + */ +typedef enum _aul_return_val { + AUL_R_LOCAL = -7, /**< Launch by himself */ + AUL_R_ETIMEOUT = -6, /**< Timeout */ + AUL_R_ECANCELED = -5, /**< Operation canceled */ + AUL_R_EINVAL = -4, /**< Invalid argument */ + AUL_R_ECOMM = -3, /**< Comunication Error */ + AUL_R_ENOINIT = -2, /**< AUL handler NOT initialized */ + AUL_R_ERROR = -1, /**< General error */ + AUL_R_OK = 0 /**< General success */ +}aul_return_val; + +enum app_status { + STATUS_LAUNCHING, + STATUS_CREATED, + STATUS_FOCUS, + STATUS_VISIBLE, + STATUS_BG, + STATUS_DYING, + STATUS_HOME +}; + +/** @} */ + +/** + * @defgroup aul_launch Primitive APIs to launch/resume/terminate application + * @ingroup aul + * @brief + * APIs to launch/resume/terminate application + * - Launch application based on application package name + * - Resume application based on application package name + * - Resume application based on pid (required root or inhouse permisssion) + * - Terminate application base on pid (required root or inhouse permission) + * + * AUL internal information + * - AUL grant pid, gid to launched application for security + * - AUL send RESET/RESUME/TERM event for running application in case of single instance + * - AUL set application enviroment based on desktop entry + * - AUL support single instance / multi instance + * - AUL support application data exchange format (bundle) + */ + +/** + * @addtogroup aul_launch + * @{ + */ + +typedef enum _aul_type{ + AUL_START, + AUL_RESUME, + AUL_TERMINATE +}aul_type; + +/** AUL internal private key */ +#define AUL_K_PKG_NAME "__AUL_PKG_NAME__" +/** AUL internal private key */ +#define AUL_K_WAIT_RESULT "__AUL_WAIT_RESULT__" +/** AUL internal private key */ +#define AUL_K_SEND_RESULT "__AUL_SEND_RESULT__" +/** AUL internal private key */ +#define AUL_K_TASK_MANAGE "__AUL_TASK_MANAGE__" +/** AUL internal private key */ +#define AUL_K_APP_TYPE "__AUL_APP_TYPE__" +/** AUL internal private key - To check original caller's identity */ +#define AUL_K_ORG_CALLER_PID "__AUL_ORG_CALLER_PID__" +/** AUL internal private key - To check forwarded callee app's pid */ +#define AUL_K_FWD_CALLEE_PID "__AUL_FWD_CALLEE_PID__" + +/** AUL public key - To check caller's secuirty */ +#define AUL_K_CALLER_PID "__AUL_CALLER_PID__" +/** AUL public key - To check callee's secuirty */ +#define AUL_K_CALLEE_PID "__AUL_CALLEE_PID__" + +/** AUL public key - To find argv0 */ +#define AUL_K_ARGV0 "__AUL_ARGV0__" +/** AUL public key - To measure launching time */ +#define AUL_K_STARTTIME "__AUL_STARTTIME__" + +/** AUL public key - To support launching based on mime type */ +#define AUL_K_MIME_TYPE "__AUL_MIME_TYPE__" +/** AUL public key - To support launching based on mime type */ +#define AUL_K_UNALIASED_MIME_TYPE "__AUL_UNALIASED_MIME_TYPE__" +/** AUL public key - To support launching based on mime type */ +#define AUL_K_MIME_CONTENT "__AUL_MIME_CONTENT__" + +/** AUL public key - To support launching based on service */ +#define AUL_K_SERVICE_NAME "__AUL_SERVICE_NAME__" + +/** AUL public key - To force launch app selector instead of lauchingn default app */ +#define AUL_K_FORCE_LAUNCH_APP_SELECTOR "__AUL_FORCE_LAUNCH_APP_SELECTOR__" + +/** AUL public key - To support SDK */ +#define AUL_K_SDK "__AUL_SDK__" + +/** AUL public key - To support Media key */ +#define AUL_K_MULTI_KEY "__AUL_MULTI_KEY__" +/** AUL public key - To support Media key */ +#define AUL_K_MULTI_KEY_EVENT "__AUL_MULTI_KEY_EVENT__" + +/** AUL public bundle value - To support Media key*/ +#define AUL_V_KEY_PRESSED "__AUL_KEY_PRESSED__" +/** AUL public bundle value - To support Media key*/ +#define AUL_V_KEY_RELEASED "__AUL_KEY_RELEASED__" + +/** AUL internal private key */ +#define AUL_K_EXEC "__AUL_EXEC__" +/** AUL internal private key */ +#define AUL_K_MULTIPLE "__AUL_MULTIPLE__" +/** AUL internal private key */ +#define AUL_K_PACKAGETYPE "__AUL_PACKAGETYPE__" +/** AUL internal private key */ +#define AUL_K_HWACC "__AUL_HWACC__" + + +/** AUL internal private key */ +#define AUL_K_APPID "__AUL_APPID__" +/** AUL internal private key */ +#define AUL_K_PID "__AUL_PID__" + + + +/** + * @brief This is callback function for aul_launch_init + * @param[in] type event's type received from system + * @param[in] b In case of RESET events, bundle which is received from peer + * @param[in] data user-supplied data + */ +typedef int (*aul_handler_fn) (aul_type type, bundle * b, void *data); + +/** + * @par Description: + * This API install your AUL handler and setup AUL internal connection. + * @par Purpose: + * AUL receive START(RESET), RESUME, TERMINATE events from system.\n + * This API use to handle the events. \n + * @par Typical use case: + * In general, you need not use this API. + * If you use AppCore, you should NOT use this API. + * AppCore will set default aul_handler. + * + * @param[in] handler aul main callback handler function + * @param[in] data user-supplied data for start_handler + * @return 0 if success, negative value(<0) if fail\n + * @retval AUL_R_OK - success + * @retval AUL_R_ECANCELD - aul handler was installed already by others + * @retval AUL_R_ECOMM - error to create internal ipc + * @retval AUL_R_ERROR - error to attach glib main loop or ecore main loop + * + * @warning If you use AppCore, you should NOT use this API.\n + * You need glib main loop or ecore main loop.\n + * @pre + * you must have aul handler to use this API. + * aul_luanch_init register aul handler. + * @post + * None + * @see + * None + * @code + * #include <aul.h> + * #include <bundle.h> + * + * static int aul_handler(aul_type type, bundle *kb,void *data) + * { + * switch(type) + * { + * case AUL_START: + * // process RESET event + * break; + * case AUL_RESUME: + * // process RESUME event + * break; + * case AUL_TERMINATE: + * // preocess TERMINATE event + * break; + * } + * return 0; + * } + * + * int main(int argc, char **argv) + * { + * ecore_init(); + * aul_launch_init(aul_handler,NULL); + * aul_launch_argv_handler(argc, argv); + * ecore_main_loop_begin(); + * } + * + * @endcode + * @remark + * None +*/ +int aul_launch_init(aul_handler_fn handler, void *data); + +/** + * @par Description: + * This API create internal RESET events with given argc, argv \n + * @par Purpose: + * This API's purpose is to generate reset event. + * If you want to generate local RESET events with argument vector format, use this API + * @par Typical use case: + * In general, you need not use this API. + * AppCore use this API to create internal reset event. + * + * @param[in] argc # of args + * @param[in] argv list of arg strings + * @return 0 if success, negative value(<0) if fail + * @retval AUL_R_OK - success + * @retval AUL_R_ENOINIT - aul handler was NOT yet installed + * @retval AUL_R_ECANCLED - error to create internal bundle with given argc,argv. + * @retval AUL_R_ERROR - general error + * + * @pre + * you must have aul handler to use this API. + * aul_luanch_init register aul handler. + * @post + * None + * @see + * aul_launch_init + * @code + * #include <aul.h> + * #include <bundle.h> + * + * int send_local_reset_event() + * { + * int argc=3; + * char* argv[4]; + * argv[0] = "local.app"; + * argv[1] = "event_type"; + * argv[2] = "my_reset"; + * argv[3] = NULL; + * aul_launch_argv_handler(argc,argv); + * } + * + * @endcode + * @remark + * If you use AppCore, you NEED NOT use this API. +*/ +int aul_launch_argv_handler(int argc, char **argv); + +/** + * @par Description: + * This API creates internal RESET events with given bundle \n + * @par Purpose: + * This API's purpose is to generate reset event. + * If you want to generate local RESET events with argument vector format, first use + * bundle_import_from_argv to create a bundle from the argument vector and then use this API + * Eventually, this API will replace aul_launch_argv_handler(). + * @par Typical use case: + * In general, you need not use this API. + * AppCore use this API to create internal reset event. + * + * @param[in] b bundle + * @return 0 if success, negative value(<0) if fail + * @retval AUL_R_OK - success + * @retval AUL_R_ENOINIT - aul handler was NOT yet installed + * @retval AUL_R_ERROR - general error + * + * @pre + * you must have aul handler to use this API. + * aul_luanch_init register aul handler. + * @post + * None + * @see + * aul_launch_init, bundle_import_from_argv + * @code + * #include <aul.h> + * #include <bundle.h> + * + * int send_local_reset_event() + * { + * bundle* b; + * int argc=3; + * char* argv[4]; + * argv[0] = "local.app"; + * argv[1] = "event_type"; + * argv[2] = "my_reset"; + * argv[3] = NULL; + * + * b = bundle_import_from_argv(argc,argv); + * aul_launch_local(b); + * } + * + * @endcode + * @remark + * If you use AppCore, you NEED NOT to use this API. +*/ +int aul_launch_local(bundle *b); + +/** + * @par Description: + * This API launches application with the given bundle. + * If the application is not running or a multiple-instance one, this API launches with the given bundle. + * If the application is running, this API sends a RESET event to the App. + * While the application is running, if the application cannot receive the RESET event, + * this API returns a general error(AUL_R_ERROR).\n + * @par Purpose: + * This API is for caller. + * This API's purpose is to launch/reset application with given bundle. + * @par Typical use case: + * If you know the target application's pkgname and bundle types, + * you can use this API to launch/reset the application. + * + * @param[in] pkgname package name to be run as callee + * @param[in] kb bundle to be passed to callee + * @return callee's pid if success, negative value(<0) if fail + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invaild package name + * @retval AUL_R_ECOM - internal AUL IPC error + * @retval AUL_R_ERROR - general error + * + * @pre + * None + * @post + * None + * @see + * aul_open_app + * @code + * #include <aul.h> + * #include <bundle.h> + * + * int launch_inhouse_contact_app() + * { + * bundle *b; + * b = bundle_create(); + * bundle_add(b,"type","SIM"); + * aul_launch_app("org.tizen.contact",b); + * } + * + * @endcode + * @remark + * None + */ +int aul_launch_app(const char *appid, bundle *kb); + +/** + * @par Description: + * This API launches application, as menu screen launches the app. + * Thus, if the applocation is running, this API sends a RESUME event to the app. + * If the application is not running, this API launches the app. + * While the application is running, if the application cannot receive the RESUME event, + * AUL tries to raise the application's default window. + * + * @par Purpose: + * This API is for caller. + * This API's purpose is to resume/launch application + * @par Typical use case: + * If you only want to show application with previous state or default state, Use this API. + * + * @param[in] pkgname package name to be resume as callee + * @return callee's pid if success, negative value(<0) if fail + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invaild package name + * @retval AUL_R_ECOM - internal AUL IPC error + * @retval AUL_R_ERROR - general error + * + * @pre + * None + * @post + * None + * @see + * aul_launch_app, aul_app_is_running, aul_resume_pid + * @code + * #include <aul.h> + * #include <bundle.h> + * + * int open_inhouse_contact_app() + * { + * if(aul_app_is_running("org.tizen.contact")) + * aul_open_app("org.tizen.contact"); + * } + * + * @endcode + * @remark + * If you don't want to launch the app, + * you should check app's running state with aul_app_is_running. + * This API will launch the application if the application is not running. +*/ +int aul_open_app(const char *appid); + +/** + * @par Description: + * This API trigger to resume application + * If the application is running, this API send a resume event to the App. + * If the application is not running, this API returns fail. + * Although the application is running, if the application cannot receive resume event, + * AUL try to raise the application's default windows. + * @par Purpose: + * This API is for caller. + * This API's purpose is to send resume event. + * @par Typical use case: + * If you only want to show application with previous state or default state, Use this API. + * + * @param[in] pkgname package name to be resume as callee + * @return callee's pid if success, negative value(<0) if fail + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invaild package name + * @retval AUL_R_ECOM - internal AUL IPC error + * @retval AUL_R_ERROR - general error + * + * @pre + * None + * @post + * None + * @see + * aul_launch_app, aul_app_is_running, aul_resume_pid + * @deprecated + * This function will be deprecated. Use aul_open_add() instead. + * @code + * #include <aul.h> + * #include <bundle.h> + * + * int resume_inhouse_contact_app() + * { + * if(aul_app_is_running("org.tizen.contact")) + * aul_resume_app("org.tizen.contact"); + * } + * + * @endcode + * @remark + * If you don't want to launch the app, + * you should check app's running state with aul_app_is_running. + * This API will launch the application if the application is not running. + * If you want to only resume without launching in multiple instance application model, + * you should use aul_resume_pid. +*/ +int aul_resume_app(const char *appid); + +/** + * @par Description: + * This API trigger to resume application + * If the application is running, this API send a resume event to the App. + * If the application is not running, this API return AUL_R_ERROR. + * Although the application is running, if the application cannot receive resume event, + * AUL try to raise the application's default windows. + * @par Purpose: + * This API is for caller. + * This API's purpose is to send resume event. + * @par Typical use case: + * In multiple application model, If you want to only resume specific application, Use this API + * + * @param[in] pid application's pid to be resumed + * @return 0 if success, negative value(<0) if fail + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invaild pid + * @retval AUL_R_ECOM - internal AUL IPC error + * @retval AUL_R_ERROR - general error (include application is not running) + * @warning This API need to require root or inhouse permisssion \n + * If you have not the permission, this API return AUL_R_ERROR. \n + * @pre + * None + * @post + * None + * @see + * aul_launch_app + * @code + * #include <aul.h> + * #include <bundle.h> + * + * int iterfunc(const aul_app_info *info, void *data) + * { + * if(strcmp(info->pkg_name,"org.tizen.contact")==0) + * aul_resume_pid(info->pid); + * } + * + * int iterate_running_apps() + * { + * return aul_app_get_running_app_info(iterfunc,NULL); + * } + * + * @endcode + * @remark + * None +*/ +int aul_resume_pid(int pid); + +/** + * @par Description: + * This API trigger to terminate application + * + * If the application is running, this API send a terminate event to the App. \n + * If the app cannot receive the event, AUL kill forcely the application.\n + * @par Purpose: + * This API's purpose is to kill application + * @par Typical use case: + * In general, Application like Task Manager use this API. + * + * This API need to require root or inhouse permisssion. \n + * + * @param[in] pid application's pid to be terminated + * @return 0 if success, negative value(<0) if fail + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invaild pid + * @retval AUL_R_ECOM - internal AUL IPC error + * @retval AUL_R_ERROR - general error + * @warning This API need to require root or inhouse permisssion. \n + * + * @pre + * None + * @post + * None + * @see + * None + * @code + * #include <aul.h> + * #include <bundle.h> + * + * int iterfunc(const aul_app_info *info, void *data) + * { + * if(strcmp(info->pkg_name,"org.tizen.contact")==0) + * aul_terminate_pid(info->pid); + * } + * + * int iterate_running_apps() + * { + * return aul_app_get_running_app_info(iterfunc,NULL); + * } + * + * @endcode + * @remark + * If you have not the permission, this API return AUL_R_ERROR. \n +*/ +int aul_terminate_pid(int pid); + +/** @} */ + +/** + * @defgroup aul_info Helper APIs to get running application information + * @ingroup aul + * @brief + * API to get running application information (state, executable path, ..) + * - get application package name from pid + * - get application running state + * - get application list of runnning applications + */ + +/** + * @addtogroup aul_info + * @{ + */ + +/** + *@brief Running application's information structure retrieved by AUL + */ +typedef struct _aul_app_info { + int pid; /**< app's pid if running*/ + char* pkg_name; /**< application id */ + char* app_path; /**< application excutable path */ + char* appid; +} aul_app_info; + +/** + * @brief iterator function running with aul_app_get_running_app_info + * @param[out] ainfo aul_app_info retreived by aul_app_get_running_app_info + * @param[out] data user-supplied data +*/ +typedef int (*aul_app_info_iter_fn)(const aul_app_info *ainfo, void *data); + +/** + * @par Description: + * This API ask a application is running by application package name. + * @par Purpose: + * To know whether some application is running or not, use this API + * @par Typical use case: + * For example, If you want to know browser application running, + * you can check it by using this API. + * + * @param[in] pkgname application package name + * @return true / false + * @retval 1 app_name is running now. + * @retval 0 app_name is NOT running now. + * + * @pre + * None + * @post + * None + * @see + * None + * @code + * #include <aul.h> + * + * int is_running_browser_app() + * { + * return aul_app_is_running("org.tizen.browser"); + * } + * + * @endcode + * @remark + * None +* +*/ +int aul_app_is_running(const char *appid); + +/** + * @par Description: + * This API use to get running application list. + * This API call iter_fn with each aul_app_info of running apps when running application is found. + * @par Purpose: + * If you want to get running application list, use this API + * This API give you running applications which has SLP desktop file. + * @par Typical use case: + * In general, this API is used by task manager appllication. (running application list viewer) + * + * @param[in] iter_fn iterator function + * @param[in] data user-supplied data for iter_fn + * @return 0 if success, negative value(<0) if fail + * @retval AUL_R_OK - success + * @retval AUL_R_ERROR - internal error + * + * @pre + * None + * @post + * None + * @see + * None + * @code + * #include <aul.h> + * + * int iterfunc(const aul_app_info* info, void* data) + * { + * printf("\t==========================\n"); + * printf("\t pkg_name: %s\n", info->appid); + * printf("\t app_path: %s\n", info->app_path); + * printf("\t running pid: %d\n", info->pid); + * printf("\t==========================\n"); + * return 0; + * } + * + * int iterate_running_apps() + * { + * return aul_app_get_running_app_info(iterfunc,NULL); + * } + * + * @endcode + * @remark + * This API should use if you want to know running application which has desktop files. + * If you want to get all process list, you must iterate process information by using proc filesystem + * Or, If you want to get all window list, you must iterate XWindows by using XWindow APIs + */ +int aul_app_get_running_app_info(aul_app_info_iter_fn iter_fn, void *data); + +/** + * @par Description: + * This API get application package name by pid + * @par Purpose: + * If you want to get package name of running application, use this API + * @par Typical use case: + * In general, You can use this API when you want to know caller's information. + * + * @param[in] pid given pid + * @param[out] pkgname pkgname to be get + * @param[in] len length of pkgname + * @return 0 if success, negative value(<0) if fail + * @retval AUL_R_OK - success + * @retval AUL_R_ERROR - no such a package name + * @pre + * None + * @post + * None + * @see + * None + * @code + * #include <aul.h> + * #include <bundle.h> + * + * static int app_reset(bundle *b, void *data) + * { + * int pid; + * char appname[255]; + * + * pid = atoi(bundle_get_val(b,AUL_K_CALLER_PID)); + * aul_app_get_pkgname_bypid(pid, appname, sizeof(appname)); + * } + * + * @endcode + * @remark + * None +*/ +int aul_app_get_pkgname_bypid(int pid, char *pkgname, int len); + +/** + * @par Description: + * This API get application appid by pid + * @par Purpose: + * If you want to get appid of running application, use this API + * @par Typical use case: + * In general, You can use this API when you want to know caller's information. + * + * @param[in] pid given pid + * @param[out] appid application id + * @param[in] len length of pkgname + * @return 0 if success, negative value(<0) if fail + * @retval AUL_R_OK - success + * @retval AUL_R_ERROR - no such a appid + * @pre + * None + * @post + * None + * @see + * None + * @code + * #include <aul.h> + * #include <bundle.h> + * + * static int app_reset(bundle *b, void *data) + * { + * int pid; + * char appid[255]; + * + * pid = atoi(bundle_get_val(b,AUL_K_CALLER_PID)); + * aul_app_get_appid_bypid(pid, appid, sizeof(appid)); + * } + * + * @endcode + * @remark + * None +*/ +int aul_app_get_appid_bypid(int pid, char *appid, int len); + + +/** @} */ + +/** + * @defgroup aul_mime High-level APIs to launch default application based on mime type + * @ingroup aul + * @brief + * AUL High-level APIs based on mime type + * + * These APIs provide two functionality\n + * + * -# To launch default application to open a file based on its MIME type \n + * For example, you can launch the default video player to open .mp4 files + * or launch the default browser to open HTML files \n + * -# To launch default application to process given content \n + * For example, you can launch the default e-mail application to process + * "nice@samsung.com" e-mail address. + */ + +/** + * @addtogroup aul_mime + * @{ + */ + +/** + * @par Description: + * This API launch application associated with given filename + * @par Purpose: + * This API is for caller. + * This API launch application based on mime type. + * This API find mime_type associated with file name, + * and then find default app associated with found mime_type + * and then launch the app with filename argument. + * @par Typical use case: + * You can launch application to process given filename. + * That is, Even if you don't know the specific application's pkgname, + * you can launch the applicaiton processing given filename . + * For example, If you want to process image file, you can simply launch image viewer. + * At that time, you can use this APIs like aul_open_file("myimage.jpg"); + * + * @param[in] filename filename + * @return callee's pid or 0 if success, negative value if fail\n + * (when no found default app, return 0) + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invalid argument(filename) + * @retval AUL_R_ECOM - internal AUL IPC error + * @retval AUL_R_ERROR - general error + * + * @pre + * None + * @post + * None + * @see + * None + * @code + * #include <aul.h> + * + * int view_image_file(char *filename) + * { + * aul_open_file(filename); + * } + * + * @endcode + * @remark + * None + * + */ +int aul_open_file(const char* filename); + +/** + * @par Description: + * This API launch application associated with given specific mimetype + * @par Purpose: + * This API is for caller. + * This API launch application based on mime type like aul_open_file API. + * But, This API don't find mime_type associated with file name. + * This API use mimetype given by user. By using given mimetype, find default application. + * and then launch the app with filename argument. + * @par Typical use case: + * Some files cannot extract exact mimetype automatically. + * For example, To know mime type of files with DRM lock, first we should unlock DRM file. + * In this case, You can use this API. + * First, unlock DRM file, and extract mimetype from unlock file by using aul_get_mime_from_file, + * and then, use this API with DRM file and extracted mime type. + * + * @param[in] filename filename + * @param[in] mimetype specific mimetype + * @return callee's pid or 0 if success, negative value if fail\n + * (when no found default app, return 0) + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invalid argument(filename,mimetype) + * @retval AUL_R_ECOM - internal AUL IPC error + * @retval AUL_R_ERROR - general error + * + * @pre + * None + * @post + * None + * @see + * aul_open_file, aul_get_mime_from_file + * @code + * #include <aul.h> + * + * int view_drm_image_file(char *drm_filename) + * { + * char* mimetype; + * // you must implement this function + * mimetype = get_mimetype_from_drmfile(drm_filename); + * + * aul_open_file_with_mimetype(drm_filename,mimetype); + * } + * + * @endcode + * @remark + * None + */ +int aul_open_file_with_mimetype(const char *filename, const char *mimetype); + +/** + * @par Description: + * This API launch application associated with content like "http://www.samsung.com" + * @par Purpose: + * This API is for caller. + * This API launch application based on mime type. + * This API find mime_type associated with content, + * and then find default app associated with found mime_type, + * and then launch the app with content argument. + * @par Typical use case: + * You can launch application to process given content. + * That is, Even if you don't know the specific application's pkgname, + * you can launch the applicaiton processing given content. + * For example, If you want to process URL "http://www.samsung.com", + * you can simply launch browser. + * At that time, you can use this APIs like aul_open_content("http://www.samsung.com"); + * + * @param[in] content content + * @return callee's pid or 0 if success, negative value if fail\n + * (when no found default app, return 0) + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invalid argument(content) + * @retval AUL_R_ECOM - internal AUL IPC error + * @retval AUL_R_ERROR - general error or no found mimetype + * + * @pre + * None + * @post + * None + * @see + * None + * @code + * #include <aul.h> + * + * int view_url(char *url) + * { + * aul_open_content(url); + * } + * + * @endcode + * @remark + * None + * + */ +int aul_open_content(const char* content); + +/** + * @par Description: + * This API get the default application(appid) associated with MIME type + * @par Purpose: + * This API use to get default application associteted with mimetype + * In general, Setting Application need this API. + * @par Typical use case: + * Setting Application show mapping of default application / mimetype + * + * @param[in] mimetype a mime type + * @param[out] defapp a application appid of the app + * @param[in] len length of defapp + * @return 0 if success, negative value if fail + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invalid argument(mimetype) + * @retval AUL_R_ERROR - general error or no found mimetype + * + * @pre + * None + * @post + * None + * @see + * aul_set_defapp_with_mime + * @code + * #include <aul.h> + * + * void get_text_html_defapp() + * { + * char appname[255]; + * aul_get_defapp_from_mime("text/html",appname,sizeof(appname)); + * } + * + * @endcode + * @remark + * None + * + */ +int aul_get_defapp_from_mime(const char *mimetype, char *defapp, int len); + +/** + * @par Description: + * This API set the default application(appid) associated with MIME type + * @par Purpose: + * This API use to change default application associteted with mimetype + * In general, Setting Application or Installer need this API. + * @par Typical use case: + * Default Application associated with mimetype can be changed by Setting Application or installer + * So, application to process specific mimetype can be substituted. + * + * @param[in] mimetype a mime type + * @param[in] defapp a application appid of the app to be set + * @return 0 if success, negative value if fail + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invalid argument(mimetype) + * @retval AUL_R_ERROR - general error + * + * @pre + * None + * @post + * None + * @see + * aul_get_defapp_from_mime + * @code + * #include <aul.h> + * + * void set_text_html_defapp() + * { + * aul_set_defapp_with_mime("text/html","org.tizen.browser"); + * } + * + * @endcode + * @remark + * None +*/ +int aul_set_defapp_with_mime(const char *mimetype, const char *defapp); + +/** + * @par Description: + * This API get the mimetype associated with filename + * @par Purpose: + * This API use to get mimetype associteted with given filename + * In general, This API use when you want to know only mimetype given filename. + * @par Typical use case: + * For example, In trasfering data through bluetooth, + * additional information like mimetype should be added. + * In such situation, You can get mimetype by using this API. + * + * @param[in] filename file name + * @param[out] mimetype a mime type + * @param[in] len length of mimetype + * @return 0 if success, negative value if fail + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invalid argument(filename) + * @retval AUL_R_ERROR - general error + * + * @pre + * None + * @post + * None + * @see + * None + * @code + * #include <aul.h> + * + * void get_mimetype() + * { + * char mimetype[255]; + * aul_get_mime_from_file("image.jpg",mimetype,sizeof(mimetype)); + * } + * + * @endcode + * @remark + * None + */ +int aul_get_mime_from_file(const char *filename, char *mimetype, int len); + +/** + * @par Description: + * This API get the mimetype associated with given content + * @par Purpose: + * This API use to get mimetype associteted with given content + * In general, This API use when you want to know only mimetype given content + * @par Typical use case: + * For example, In trasfering data through bluetooth, + * additional information like mimetype should be added. + * In such situation, You can get mimetype by using this API. + * + * @param[in] content content string like "011-0000-0000" + * @param[out] mimetype a mime type + * @param[in] len length of mimetype + * @return 0 if success, negative value if fail + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invalid argument(content) + * @retval AUL_R_ERROR - general error + * + * @pre + * None + * @post + * None + * @see + * None + * @code + * #include <aul.h> + * + * void get_mimetype() + * { + * char mimetype[255]; + * aul_get_mime_from_content("http://www.samsung.com",mimetype,sizeof(mimetype)); + * } + * + * @endcode + * @remark + * None +*/ +int aul_get_mime_from_content(const char *content, char *mimetype, int len); + +/** + * @par Description: + * This API get the icon's name associated with given mimetype + * @par Purpose: + * This API use to get icon's name associteted with given mimetype + * @par Typical use case: + * If you want to show mimetype's icon, use this API. + * + * @param[in] mimetype a mime type + * @param[out] iconname icon's name + * @param[in] len length of iconname + * @return 0 if success, negative value if fail + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invalid argument(content) + * @retval AUL_R_ERROR - general error (no such mime type) + * + * @pre + * None + * @post + * None + * @see + * None + * @code + * #include <aul.h> + * + * void get_mime_icon() + * { + * char icon[255]; + * aul_get_mime_icon("text/html",icon,sizeof(icon)); + * } + * + * @endcode + * @remark + * None + */ +int aul_get_mime_icon(const char *mimetype, char *iconname, int len); + +/** + * @par Description: + * This API get the extensions associated with given mimetype + * @par Purpose: + * This API use to get extensions associteted with given mimetype + * @par Typical use case: + * In general, user is not familiar with mimetype(text/html), + * user is familiar with extenstions(*.html, *.htm) + * So, To show mimetype information to user, use this API + * + * @param[in] mimetype a mime type + * @param[out] extlist extentions (ex> mpeg,mpg,mpe) + * @param[in] len length of extlist + * @return 0 if success, negative value if fail + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invalid argument(mimetype) + * @retval AUL_R_ERROR - general error (no mimetype or no extenstion) + * + * @pre + * None + * @post + * None + * @see + * aul_get_mime_description + * @code + * #include <aul.h> + * + * void get_extension() + * { + * char extlist[255]; + * aul_get_mime_extension("text/html",extlist,sizeof(extlist)); + * } + * + * @endcode + * @remark + * Some mimetype don't have extension. + * In that case, You can use aul_get_mime_description. + * +*/ +int aul_get_mime_extension(const char *mimetype, char *extlist, int len); + +/** + * @par Description: + * This API get the description associated with given mimetype + * @par Purpose: + * This API use to get description associteted with given mimetype + * @par Typical use case: + * In general, user is not familiar with mimetype(text/html), + * user is familiar with well-knowing information like extenstions(*.html, *.htm) + * But, some mimetype don't have extenstion. + * At that time,to show mimetype information to user, use this API + * + * @param[in] mimetype a mime type + * @param[out] desc description (ex> Call client) + * @param[in] len length of desc + * @return 0 if success, negative value if fail + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invalid argument(mimetype) + * @retval AUL_R_ERROR - general error (no mimetype or no descrition) + * + * @pre + * None + * @post + * None + * @see + * aul_get_mime_extension + * @code + * #include <aul.h> + * + * void get_information_from_mime() + * { + * char info[255]; + * if(aul_get_mime_extension("text/html",info,sizeof(info))<0){ + * aul_get_mime_description("text/html",info,sizeof(info)); + * } + * } + * + * @endcode + * @remark + * None + */ +int aul_get_mime_description(const char *mimetype, char *desc, int len); + +/************************************************************************************************/ +/* Example of aul_open_content or aul_open_file */ +/* voice call , browser , docview , image viewer , audio player, video player */ +/* */ +/* voice call - aul_open_content("callto://011-1111-1111"); */ +/* browser - aul_open_content("http://www.naver.com"); */ +/* - aul_open_file("/opt/share/index.html"); */ +/* docview - aul_open_file("/opt/share/word.pdf"); */ +/* image view - aul_open_file("/opt/share/image.jpg"); */ +/* audio play - aul_open_file("/opt/share/audio.mp3"); */ +/* video play - aul_open_file("/opt/share/video.mpg"); */ +/************************************************************************************************/ + +/** @} */ + +/** + * @defgroup aul_service High-level APIs to launch applications based on service. + * @ingroup aul + * @brief + * AUL High-level APIs based on service + * + * This is Request/Response mechanism based on AUL like DBUS service call with auto-activation.\n + * We recommend this APIs for requesting application service like camera application service (take_picture) + * But, You can use other mechanism like DBUS service or your own internal IPC + * + * - Caller\n + * Launch application based on service \n + * If application is not running, AUL requests to reset the event.\n + * Application can wait result with callback function. + * + * - Callee\n + * After callee performs the requested operation, callee sends the result back, if necessary.\n + * + */ + +/** + * @addtogroup aul_service + * @{ + */ + +/** + * @brief aul_service_res_fn is service result function + * @param[out] b result bundle + * @param[out] data user-supplied data +*/ +typedef void (*aul_service_res_fn)(bundle *b, int reserved, void *user_data); + +/** + * @par Description: + * This API launch application based on service. + * @par Purpose: + * This API is for caller. + * This API launch application based on service name. + * This API find default application associated with service name. + * and then launch the application with given bundle. + * @par Typical use case: + * You can launch application provided the service if you know service name. + * That is, even if you don't know the specific application's pkgname, + * you can launch the applicaiton by requesting the service. + * For example, If you want to take a picture in your app, you can simply launch camera application. + * At that time, you can use this API like aul_open_service(TAKE_PICTURE_SVC,..); + * + * + * @param[in] svcname service name to launch as callee + * @param[in] b bundle to be passed to callee + * @param[in] cbfunc result callback function + * @param[in] data user-supplied data passed to callback function + * @return callee's pid if success, negative value(<0) if fail + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invaild service name + * @retval AUL_R_ENOINIT - you must initilize aul library with aul_launch_init + * @retval AUL_R_ECOM - internal AUL IPC error + * @retval AUL_R_ERROR - general error + * + * @pre + * None + * @post + * None + * @see + * None + * @code + * #include <aul.h> + * #include <aul_service.h> + * #include <bundle.h> + * + * void res_func(bundle *b, int reserved, void *user_data) + * { + * // process result bundle + * } + * + * int create_camera_view() + * { + * aul_open_service(TAKE_PICTURE_SVC, NULL, res_func, NULL); + * } + * + * @endcode + * @remark + * This API can wait result (asynchronous). + * To see kinds of default service provided by platform, see "aul_service.h" header file + * + */ +int aul_open_service(const char *svcname, bundle *b, aul_service_res_fn cbfunc, void *data); + +/** + * @par Description: + * This API create service result bundle based on bundle received in reset event. + * @par Purpose: + * This API use to create result bundle to send it to caller. + * @par Typical use case: + * This API is for callee which provide application service.\n + * To send result to caller, You must create result bundle. \n + * Callee(application providing the service) can send result by using this API and aul_send_service_result. + * + * @param[in] inb bundle received in reset event + * @param[out] outb bundle to use for returning result + * @return 0 if success, negative value(<0) if fail + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - inb is not bundle created by aul_open_service + * @retval AUL_R_ERROR - general error + * + * @pre + * To create result bundle, You need received original bundle. + * The original bundle can get from app_reset handler. + * @post + * None + * @see + * aul_send_service_result + * @code + * #include <aul.h> + * #include <bundle.h> + * + * int app_reset(bundle *b, void *data) + * { + * ad->recved_bundle = bundle_dup(b); + * } + * + * int click_ok() + * { + * bundle* res_bundle; + * aul_create_result_bundle(ad->recved_bundle,&res_bundle); + * bundle_add(res_bundle, "result", "1"); + * aul_send_service_result(res_bundle); + * } + * @endcode + * @remark + * None + * + */ +int aul_create_result_bundle(bundle *inb, bundle **outb); + +/** + * @par Description: + * This API send service result to caller with bundle + * @par Purpose: + * This API is used to send result bundle to caller. + * @par Typical use case: + * This API is for callee which provide application service.\n + * To send result to caller, You can use this API after creating result bundle. \n + * Callee(application to provide service) can send result by using this API and aul_create_result_bundle. + * + * @param[in] b Result data in bundle format + * @return 0 if success, negative value(<0) if fail + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invalid result bundle + * @retval AUL_R_ECOMM - internal AUL IPC error + * @retval AUL_R_ERROR - general error + * + * @pre + * To send result bundle, You must create result bundle. + * see aul_create_result_bundle + * @post + * None + * @see + * aul_create_result_bundle + * @code + * #include <aul.h> + * #include <bundle.h> + * + * int app_reset(bundle *b, void *data) + * { + * ad->recved_bundle = bundle_dup(b); + * } + * + * int click_ok() + * { + * bundle* res_bundle; + * aul_create_result_bundle(ad->recved_bundle,&res_bundle); + * bundle_add(res_bundle, "result", "1"); + * aul_send_service_result(res_bundle); + * } + * @endcode + * @remark + * None + * + */ +int aul_send_service_result(bundle *b); + +/** + * @par Description: + * This API set the default application(appid) associated with service name + * @par Purpose: + * This API use to change default application associteted with service name + * In general, Setting Application needs this API. + * @par Typical use case: + * Default Application associated with service name can be changed by Setting Application + * So, Inhouse service application can be substituted by 3rd party service application + * + * @param[in] svcname service string like "create_contact" + * @param[in] defapp default application like "org.tizen.contact" + * @return 0 if success, negative value if fail + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invalid argument(content) + * @retval AUL_R_ERROR - general error + * + * @pre + * None + * @post + * None + * @see + * aul_get_defapp_for_service + * @code + * #include <aul.h> + * #include <aul_service.h> + * + * void set_camera_service_defapp() + * { + * aul_set_defapp_for_service(TAKE_PICTURE_SVC,"org.tizen.camera"); + * } + * + * @endcode + * @remark + * None + * + */ +int aul_set_defapp_for_service(const char *svcname, const char *defapp); + +/** + * @par Description: + * This API get the application appid associated with given service name + * @par Purpose: + * This API use to get default application associteted with service name + * In general, Setting Application need this API. + * @par Typical use case: + * Setting Application show mapping of default application/ service + * + * @param[in] svcname service string like "create_contact" + * @param[out] defapp default application + * @param[in] len length of defapp + * @return 0 if success, negative value if fail + * @retval AUL_R_OK - success + * @retval AUL_R_EINVAL - invalid argument(content) + * @retval AUL_R_ERROR - general error + * + * @pre + * None + * @post + * None + * @see + * aul_set_defapp_for_service + * @code + * #include <aul.h> + * #include <aul_service.h> + * + * void get_camera_service_defapp() + * { + * char appname[255]; + * aul_get_defapp_for_service(TAKE_PICTURE_SVC,appname,sizeof(appname)); + * } + * + * @endcode + * @remark + * None + * + */ +int aul_get_defapp_for_service(const char *svcname, char *defapp, int len); + +/** + * @par Description: + * This API sets callback fuction that will be called when applications die. + * @par Purpose: + * This API's purpose is to listen the application dead event. + * In general, task manager Application need this API. + * + * @param[in] func callback function + * @param[in] data user data + * @return 0 if success, negative value if fail + * @retval AUL_R_OK - success + * @retval AUL_R_ERROR - general error + * + * @pre + * None + * @post + * None + * @see + * aul_listen_app_launch_signal + * @code + * #include <aul.h> + * + * int app_dead_handler(int pid, void *data) + * { + * printf("===> %s : %d\n", __FUNCTION__, pid); + * return 0; + * } + * + * void dead_listen() + * { + * aul_listen_app_dead_signal(app_dead_handler, NULL); + * } + * + * @endcode + * @remark + * None + * + */ +int aul_listen_app_dead_signal(int (*func) (int, void *), void *data); + +/** + * @par Description: + * This API sets callback fuction that will be called when applications are launched. + * @par Purpose: + * This API's purpose is to listen the application launching event. + * In general, task manager Application need this API. + * + * @param[in] func callback function + * @param[in] data user data + * @return 0 if success, negative value if fail + * @retval AUL_R_OK - success + * @retval AUL_R_ERROR - general error + * + * @pre + * None + * @post + * None + * @see + * aul_listen_app_dead_signal + * @code + * #include <aul.h> + * + * int app_launch_handler(int pid, void *data) + * { + * printf("===> %s : %d\n", __FUNCTION__, pid); + * return 0; + * } + * + * void dead_listen() + * { + * aul_listen_app_launch_signal(app_launch_handler, NULL); + * } + * + * @endcode + * @remark + * None + * + */ +int aul_listen_app_launch_signal(int (*func) (int, void *), void *data); + +/** @} */ + + + +#ifdef __cplusplus + } +#endif + + +#endif /* __AUL_H__ */ + +/* vi: set ts=8 sts=8 sw=8: */ diff --git a/include/aul_api.h b/include/aul_api.h new file mode 100755 index 00000000..7dba1952 --- /dev/null +++ b/include/aul_api.h @@ -0,0 +1,25 @@ +/* + * aul + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com> + * + * 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 SLPAPI +#define SLPAPI __attribute__ ((visibility("default"))) +#endif diff --git a/include/aul_service.h b/include/aul_service.h new file mode 100755 index 00000000..f34e650f --- /dev/null +++ b/include/aul_service.h @@ -0,0 +1,84 @@ +/* + * aul + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com> + * + * 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. + * + */ + + +/** + * @addtogroup aul_service + * @{ + */ + +/** alarm app_service, 1 svc */ +#define CREATE_ALARM_SVC "create_alarm" + +/** calendar app_service , 3 svc */ +#define OPEN_CALENDAR_SVC "open_calendar" +#define CREATE_EVENT_SVC "create_event" +#define VIEW_EVENT_SVC "view_event" + +/** camera app_service , 3 svc */ +#define TAKE_PICTURE_SVC "take_picture" /* have result*/ +#define RECORD_VIDEO_SVC "record_video" /* have result*/ +#define READ_BARCODE_SVC "read_barcode" /* have result*/ + +/** contact app_service , 1 svs */ +#define SEARCH_CONTACT_SVC "search_contact" + +/** email app_service , 2 svc */ +#define CREATE_EMAIL_SVC "create_email" +#define VIEW_EMAIL_SVC "view_email" + +/** file browser app_service, 1 svc */ +#define BROWSE_FILE_SVC "browse_file" + +/** memo app_service , 2 svc */ +#define CREATE_MEMO_SVC "create_memo" +#define VIEW_MEMO_SVC "view_memo" + +/** message(sms,mms) app_service , 2 svc */ +#define CREATE_MESSAGE_SVC "create_message" +#define VIEW_MESSAGE_SVC "view_message" + +/** search app_service, 1 svc */ +#define SEARCH_SVC "search" + +/** video call app_service, 1 svc */ +#define MAKE_VIDEOCALL_SVC "make_videocall" + +/** voice call app_service, 1 svc */ +#define MAKE_VOICECALL_SVC "make_voicecall" + +/** voice record app_service, 1 svc */ +#define RECORD_VOICE_SVC "record_voice" /* have result*/ + +/** music player app_service, 1 svc */ +#define PLAY_MUSIC_SVC "play_music" + +/** web browser app_service, 1 svc */ +#define BROWSE_WEB_SVC "browse_web" + +/** facebook app_service, 1 svc */ +#define UPDATE_FACEBOOK_SVC "update_facebook" + +/** twitter app_service, 1 svc */ +#define UPDATE_TWITTER_SVC "update_twitter" + +/** ebook app_service, 1 svc */ +#define OPEN_EBOOK_SVC "open_ebook" diff --git a/include/aul_util.h b/include/aul_util.h new file mode 100755 index 00000000..e4c4630e --- /dev/null +++ b/include/aul_util.h @@ -0,0 +1,51 @@ +/* + * aul + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com> + * + * 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 __AUL_UTIL_H_ +#define __AUL_UTIL_H_ + +#define AUL_UTIL_PID -2 + +#define MAX_PACKAGE_STR_SIZE 512 +#define MAX_PACKAGE_APP_PATH_SIZE 512 +#define MAX_RUNNING_APP_INFO 512 + +typedef struct _app_status_info_t{ + char appid[MAX_PACKAGE_STR_SIZE]; + char app_path[MAX_PACKAGE_APP_PATH_SIZE]; + int status; + int pid; +} app_status_info_t; + +struct amdmgr { + struct appinfomgr *af; /* appinfo manager */ + struct cginfo *cg; /* cgroup infomation */ +}; + +int _add_app_status_info_list(char *appid, int pid); +int _update_app_status_info_list(int pid, int status); +int _remove_app_status_info_list(int pid); + +#endif + + + diff --git a/include/key.h b/include/key.h new file mode 100755 index 00000000..e7146acb --- /dev/null +++ b/include/key.h @@ -0,0 +1,28 @@ +/* + * aul + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com> + * + * 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 __APP_KEY_H_ +#define __APP_KEY_H_ + +int app_key_event(bundle *kb); + +#endif diff --git a/include/launch.h b/include/launch.h new file mode 100755 index 00000000..090f403e --- /dev/null +++ b/include/launch.h @@ -0,0 +1,49 @@ +/* + * aul + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com> + * + * 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 __APP_LAUNCH_H_ +#define __APP_LAUNCH_H_ + +#include <glib.h> + +int aul_initialize(); +int aul_register_init_callback( + int (*aul_handler)(aul_type type, bundle *, void *), void *data); +int aul_is_initialized(); +int aul_sock_handler(int fd); +int aul_make_bundle_from_argv(int argc, char **argv, bundle **kb); + +int app_start(bundle *kb); +int app_send_cmd(int pid, int cmd, bundle *kb); +int app_request_to_launchpad(int cmd, const char *pkgname, bundle *kb); + +int _app_start_res_prepare(bundle *kb); +int app_result(int cmd, bundle *kb, int launched_pid); +int aul_send_result(bundle *kb, int is_cancel); +int aul_launch_app_with_result(const char *pkgname, bundle *kb, + void (*cbfunc) (bundle *, int, void *), + void *data); + +gboolean __aul_glib_handler(gpointer data); + + +#endif diff --git a/include/menu_db_util.h b/include/menu_db_util.h new file mode 100755 index 00000000..bbd569be --- /dev/null +++ b/include/menu_db_util.h @@ -0,0 +1,231 @@ +/* + * aul + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com> + * + * 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. + * + */ + + +#include <ail.h> +#include <string.h> +#include "simple_util.h" + +#define MAX_PATH_LEN 1024 + +#define AUL_APP_INFO_FLD_PKG_NAME "package" +#define AUL_APP_INFO_FLD_APP_PATH "exec" +#define AUL_APP_INFO_FLD_APP_TYPE "x_slp_packagetype" +#define AUL_APP_INFO_FLD_WIDTH "x_slp_baselayoutwidth" +#define AUL_APP_INFO_FLD_HEIGHT "x_slp_baselayoutheight" +#define AUL_APP_INFO_FLD_VERTICAL "x_slp_ishorizontalscale" +#define AUL_APP_INFO_FLD_MULTIPLE "x_slp_multiple" +#define AUL_APP_INFO_FLD_TASK_MANAGE "x_slp_taskmanage" +#define AUL_APP_INFO_FLD_MIMETYPE "mimetype" +#define AUL_APP_INFO_FLD_SERVICE "x_slp_service" + +#define AUL_RETRIEVE_PKG_NAME "package = '?'" +#define AUL_RETRIEVE_APP_PATH "exec = '?'" +#define AUL_RETRIEVE_MIMETYPE "mimetype like '?'" +#define AUL_RETRIEVE_SERVICE "x_slp_service like '?'" + +typedef struct { + char *pkg_name; /* package */ + char *app_path; /* exec */ + char *original_app_path; /* exec */ + char *pkg_type; /* x_slp_packagetype */ + char *hwacc; /* hwacceleration */ +} app_info_from_db; + +static inline char *_get_pkgname(app_info_from_db *menu_info) +{ + return menu_info ? menu_info->pkg_name : NULL; +} + +static inline char *_get_app_path(app_info_from_db *menu_info) +{ + int i = 0; + int path_len = -1; + + if (!menu_info || menu_info->app_path == NULL) + return NULL; + + while (menu_info->app_path[i] != 0) { + if (menu_info->app_path[i] == ' ' + || menu_info->app_path[i] == '\t') { + path_len = i; + break; + } + i++; + } + + if (path_len == 0) { + free(menu_info->app_path); + menu_info->app_path = NULL; + } else if (path_len > 0) { + char *tmp_app_path = malloc(sizeof(char) * (path_len + 1)); + if(tmp_app_path == NULL) + return NULL; + snprintf(tmp_app_path, path_len + 1, "%s", menu_info->app_path); + free(menu_info->app_path); + menu_info->app_path = tmp_app_path; + } + + return menu_info->app_path; +} + +static inline char *_get_original_app_path(app_info_from_db *menu_info) +{ + return menu_info ? menu_info->original_app_path : NULL; +} + +static inline void _free_app_info_from_db(app_info_from_db *menu_info) +{ + if (menu_info != NULL) { + if (menu_info->pkg_name != NULL) + free(menu_info->pkg_name); + if (menu_info->app_path != NULL) + free(menu_info->app_path); + if (menu_info->original_app_path != NULL) + free(menu_info->original_app_path); + if (menu_info->hwacc != NULL) + free(menu_info->hwacc); + free(menu_info); + } +} + +static inline app_info_from_db *_get_app_info_from_db_by_pkgname( + const char *pkgname) +{ + app_info_from_db *menu_info; + ail_appinfo_h handle; + ail_error_e ret; + char *str = NULL; + + menu_info = calloc(1, sizeof(app_info_from_db)); + if (menu_info == NULL) { + return NULL; + } + + ret = ail_get_appinfo(pkgname, &handle); + if (ret != AIL_ERROR_OK) { + _free_app_info_from_db(menu_info); + return NULL; + } + + ret = ail_appinfo_get_str(handle, AIL_PROP_PACKAGE_STR, &str); + if (str) { + menu_info->pkg_name = strdup(str); + str = NULL; + } + + ret = ail_appinfo_get_str(handle, AIL_PROP_EXEC_STR, &str); + if (str) { + menu_info->app_path = strdup(str); + str = NULL; + } + + if (menu_info->app_path != NULL) + menu_info->original_app_path = strdup(menu_info->app_path); + + ret = ail_appinfo_get_str(handle, AIL_PROP_X_SLP_PACKAGETYPE_STR, &str); + if (str) { + menu_info->pkg_type = strdup(str); + str = NULL; + } + + ret = ail_destroy_appinfo(handle); + if (ret != AIL_ERROR_OK) { + _E("ail_destroy_appinfo failed"); + } + + if (!_get_app_path(menu_info)) { + _free_app_info_from_db(menu_info); + return NULL; + } + + return menu_info; +} + +static inline ail_cb_ret_e __appinfo_func(const ail_appinfo_h appinfo, void *user_data) +{ + app_info_from_db *menu_info = (app_info_from_db *)user_data; + char *package; + ail_cb_ret_e ret = AIL_CB_RET_CONTINUE; + + if (!menu_info) + return ret; + + ail_appinfo_get_str(appinfo, AIL_PROP_PACKAGE_STR, &package); + if (package) { + menu_info->pkg_name = strdup(package); + ret = AIL_CB_RET_CANCEL; + } + + return ret; +} + +static inline app_info_from_db *_get_app_info_from_db_by_apppath( + const char *apppath) +{ + app_info_from_db *menu_info = NULL; + ail_filter_h filter; + ail_error_e ret; + int count; + + if (apppath == NULL) + return NULL; + + menu_info = calloc(1, sizeof(app_info_from_db)); + if (menu_info == NULL) + return NULL; + + ret = ail_filter_new(&filter); + if (ret != AIL_ERROR_OK) { + _free_app_info_from_db(menu_info); + return NULL; + } + + ret = ail_filter_add_str(filter, AIL_PROP_X_SLP_EXE_PATH, apppath); + if (ret != AIL_ERROR_OK) { + ail_filter_destroy(filter); + _free_app_info_from_db(menu_info); + return NULL; + } + + ret = ail_filter_count_appinfo(filter, &count); + if (ret != AIL_ERROR_OK) { + ail_filter_destroy(filter); + _free_app_info_from_db(menu_info); + return NULL; + } + if (count < 1) { + ail_filter_destroy(filter); + _free_app_info_from_db(menu_info); + return NULL; + } + + ail_filter_list_appinfo_foreach(filter, __appinfo_func, (void *)menu_info); + + ail_filter_destroy(filter); + + menu_info->app_path = strdup(apppath); + menu_info->original_app_path = strdup(apppath); + + return menu_info; + +} + diff --git a/include/mida.h b/include/mida.h new file mode 100755 index 00000000..271f9513 --- /dev/null +++ b/include/mida.h @@ -0,0 +1,51 @@ +/* + * aul + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com> + * + * 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 __MIDA_H__ +#define __MIDA_H__ + +#include <sqlite3.h> +#include <time.h> +#include <sys/types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +int mida_clear(void); +int mida_delete_with_pkgname(const char *pkg_name); +int mida_delete_with_mimetype(const char *mime_type); +int mida_add_app(const char *mime_type, const char *pkg_name); +char *mida_get_app(const char *mime_type); + +int svc_clear(void); +int svc_delete_with_pkgname(const char *pkg_name); +int svc_delete_with_svcname(const char *svc_name); +int svc_add_app(const char *svc_name, const char *pkg_name); +char *svc_get_app(const char *svc_name); + +int is_supported_svc(const char *svc_name); +#ifdef __cplusplus +} +#endif +#endif /*__MIDA_H__ */ + diff --git a/include/miregex.h b/include/miregex.h new file mode 100755 index 00000000..db8b8db6 --- /dev/null +++ b/include/miregex.h @@ -0,0 +1,39 @@ +/* + * aul + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com> + * + * 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 _MIREGEX_H_ +#define _MIREGEX_H_ + +#include <regex.h> + +typedef struct _regex_tbl { + char *mimetype; + char *regex; + char *desc; + regex_t regex_preg; + struct _regex_tbl *next; +} regex_tbl; + +regex_tbl *miregex_get_regex_table(); + +#endif + diff --git a/include/perf.h b/include/perf.h new file mode 100755 index 00000000..fb2582fa --- /dev/null +++ b/include/perf.h @@ -0,0 +1,68 @@ +/* + * aul + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com> + * + * 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 __PERF_H__ +#define __PERF_H__ + +#ifdef PERF_ACTIVATE + +#include <sys/time.h> +static struct timeval __g_base_time = { + .tv_sec = 0, + .tv_usec = 0 +}; + +#define INIT_PERF(kb)\ +do {\ + const char *tmp;\ + struct timeval tv;\ + tmp = bundle_get_val(kb, AUL_K_STARTTIME);\ + if (tmp != NULL)\ + sscanf(tmp, "%ld/%ld", &tv.tv_sec, &tv.tv_usec);\ + else\ + gettimeofday(&tv, NULL);\ + __g_base_time.tv_sec = tv.tv_sec;\ + __g_base_time.tv_usec = tv.tv_usec;\ +} while (0); + +#define PERF(fmt, arg...)\ +do {\ + struct timeval cur;\ + struct timeval res;\ + gettimeofday(&cur, NULL);\ + if (__g_base_time.tv_sec != 0) {\ + timersub(&cur, &__g_base_time, &res);\ + printf("%c[1;31m[%s,%d] %ld sec %ld msec "fmt" %c[0m\n",\ + 27, __FUNCTION__, __LINE__, \ + res.tv_sec, res.tv_usec/1000, ##arg, 27);\ + } \ +} while (0); + +#else + +#define INIT_PERF(kb) +#define PERF(fmt, arg...) + +#endif + +#endif + diff --git a/include/pg-doxy/doxygen.conf b/include/pg-doxy/doxygen.conf new file mode 100755 index 00000000..a7cd424e --- /dev/null +++ b/include/pg-doxy/doxygen.conf @@ -0,0 +1,850 @@ +# Doxyfile 1.5.2 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = SLP-Developer Library +PROJECT_NUMBER = +OUTPUT_DIRECTORY = ./doxygen_output +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = NO +ALWAYS_DETAILED_SEC = YES +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = YES +JAVADOC_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = YES +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = YES +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = NO +EXTRACT_LOCAL_METHODS = YES +HIDE_UNDOC_MEMBERS = YES +HIDE_UNDOC_CLASSES = YES +HIDE_FRIEND_COMPOUNDS = YES +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = YES +SORT_BY_SCOPE_NAME = YES +SORT_GROUP_NAMES = YES +GENERATE_TODOLIST = NO +USE_INLINE_TREES = NO +SHOW_NAMESPACES = NO +HTML DYNAMIC SECTIONS = YES +GENERATE_TESTLIST = NO +GENERATE_BUGLIST = NO +GENERATE_DEPRECATEDLIST= NO +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = NO +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = .. + +# This tag can be used to specify the character encoding of the source files that +# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default +# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. +# See http://www.gnu.org/software/libiconv for the list of possible encodings. + +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.h \ + *.doxy +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = */test/* \ + */debian/* \ + */lost+found/* \ + */i386/* \ + */arm/* \ + */simulator/* \ + *test* \ + */voda3rd/* +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = ../image +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentstion. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 10 +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET =./slp_doxy.css + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = YES + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = YES + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 190 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = YES + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = NO + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to +# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to +# specify the directory where the mscgen tool resides. If left empty the tool is assumed to +# be found in the default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = NO + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = NO + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = NO + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = NO + +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a caller dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable caller graphs for selected +# functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = NO + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = NO + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = jpg + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen will always +# show the root nodes and its direct children regardless of this setting. + +DOT_GRAPH_MAX_NODES = 50 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = NO + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = NO + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = YES diff --git a/include/pg-doxy/pg-doxy.sh b/include/pg-doxy/pg-doxy.sh new file mode 100755 index 00000000..c7562918 --- /dev/null +++ b/include/pg-doxy/pg-doxy.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# Create doxygen from debian package server +# By Jungbae Lee (yi_jungbae@samsung.com) + +cd `dirname $0` +CWD=`pwd` + +# Use doxygen 1.7.0 +export PATH=/usr/local/bin:${HOME}/mytools/bin:${PATH} +export LD_LIBRARY_PATH=${HOME}/mytools/lib:${LD_LIBRARY_PATH} + + +### Configuration +SBOX=/scratchbox/users/$USER/home/$USER +DOXYGEN_OUTPUT_DIR=$CWD/doxygen_output +DOXYGEN=./tool/bin/doxygen +DOXY_CONF=doxygen.conf +IMAGE_DIR=../../image #need to change +#IMAGE_DIR=[fill your image path] + + + +####doxygen configuration :: output Directory +mkdir $DOXYGEN_OUTPUT_DIR + +echo "Doxygen running..." +if [ ! -e $CWD/doxygen_output ]; then + mkdir $CWD/doxygen_output +fi +# Run doxygen +$DOXYGEN $DOXY_CONF 2>&1 + +#image copy +cp $CWD/$IMAGE_DIR/* $DOXYGEN_OUTPUT_DIR/html/ + +echo "Finished!" +exit; + diff --git a/include/pg-doxy/slp_doxy.css b/include/pg-doxy/slp_doxy.css new file mode 100644 index 00000000..12c03ac1 --- /dev/null +++ b/include/pg-doxy/slp_doxy.css @@ -0,0 +1,699 @@ +/* The standard CSS for doxygen */ + +body, table, div, p, dl { + font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; + font-size: 12px; +} + +/* @group Heading Levels */ + +h1 { + font-size: 18pt; + color: #3366ED; +} + +h1.pg { + font-size: 18pt; + color: #336666; + margin-right:-0.6pt; + margin-left:0cm; + padding-top:0cm; + padding-right:0cm; + padding-bottom:1pt; + padding-left:0cm; + border-bottom-width:1.5pt; + border-bottom-color:#336666; + border-top-style:none; + border-right-style:none; + border-bottom-style:solid; + border-left-style:none; +} + +h2 { + font-size: 14pt; + color: #336666; +} +h2.pg { + font-size: 14pt; + color: #336666; + margin-right:-0.1pt; + margin-left:0cm; + padding-top:0cm; + padding-right:0cm; + padding-bottom:1pt; + padding-left:0cm; + border-bottom-width:1.2pt; + border-bottom-color:#336666; + border-top-style:none; + border-right-style:none; + border-bottom-style:solid; + border-left-style:none; +} + + +h3 { + font-size: 12pt; + color: #336666; +} +h3.pg { + font-size: 12pt; + color: #336666; +} + + + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd, p.starttd { + margin-top: 2px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + padding: 2px; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code { + color: #4665A2; +} + +a.codeRef { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +.fragment { + font-family: monospace, fixed; + font-size: 105%; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px + padding: .2em; + border: solid thin #333; + border-radius: .5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + margin-bottom: 6px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memItemLeft, .memItemRight, .memTemplParams { + border-top: 1px solid #C4CFE5; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 3px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.memitem { + padding: 0; + margin-bottom: 10px; +} + +.memname { + white-space: nowrap; + font-weight: bold; + margin-left: 6px; +} + +.memproto { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 8px; + -moz-border-radius-topleft: 8px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 8px; + -webkit-border-top-left-radius: 8px; + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + +} + +.memdoc { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 2px 5px; + background-color: #FBFCFD; + border-top-width: 0; + /* firefox specific markup */ + -moz-border-radius-bottomleft: 8px; + -moz-border-radius-bottomright: 8px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F8 95%, #F0); + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 8px; + -webkit-border-bottom-right-radius: 8px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FF), color-stop(0.95,#F8), to(#F0)); +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} + +/* @end */ + +/* @group Directory (tree) */ + +/* for the tree view */ + +.ftvtree { + font-family: sans-serif; + margin: 0px; +} + +/* these are for tree view when used as main index */ + +.directory { + font-size: 9pt; + font-weight: bold; + margin: 5px; +} + +.directory h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +/* +The following two styles can be used to replace the root node title +with an image of your choice. Simply uncomment the next two styles, +specify the name of your image and be sure to set 'height' to the +proper pixel height of your image. +*/ + +/* +.directory h3.swap { + height: 61px; + background-repeat: no-repeat; + background-image: url("yourimage.gif"); +} +.directory h3.swap span { + display: none; +} +*/ + +.directory > h3 { + margin-top: 0; +} + +.directory p { + margin: 0px; + white-space: nowrap; +} + +.directory div { + display: none; + margin: 0px; +} + +.directory img { + vertical-align: -30%; +} + +/* these are for tree view when not used as main index */ + +.directory-alt { + font-size: 100%; + font-weight: bold; +} + +.directory-alt h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +.directory-alt > h3 { + margin-top: 0; +} + +.directory-alt p { + margin: 0px; + white-space: nowrap; +} + +.directory-alt div { + display: none; + margin: 0px; +} + +.directory-alt img { + vertical-align: -30%; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable { + border-collapse:collapse; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; +} + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right: 15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; +} + +.navpath a:hover +{ + color:#6884BD; +} + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + diff --git a/include/pg-doxy/tool/bin/doxygen b/include/pg-doxy/tool/bin/doxygen Binary files differnew file mode 100755 index 00000000..3662da85 --- /dev/null +++ b/include/pg-doxy/tool/bin/doxygen diff --git a/include/pg-doxy/tool/bin/doxytag b/include/pg-doxy/tool/bin/doxytag Binary files differnew file mode 100755 index 00000000..adb0c903 --- /dev/null +++ b/include/pg-doxy/tool/bin/doxytag diff --git a/include/pg-doxy/tool/man/man1/doxygen.1 b/include/pg-doxy/tool/man/man1/doxygen.1 new file mode 100644 index 00000000..a3d8c9a6 --- /dev/null +++ b/include/pg-doxy/tool/man/man1/doxygen.1 @@ -0,0 +1,46 @@ +.TH DOXYGEN "1" "July 2010" "doxygen 1.7.0" "User Commands" +.SH NAME +doxygen \- documentation system for various programming languages +.SH DESCRIPTION +Doxygen is a documentation system for C++, C, Java, Objective-C, IDL +(Corba and Microsoft flavors) and to some extent PHP, C#, and D. +.PP +You can use doxygen in a number of ways: +.TP +1) Use doxygen to generate a template configuration file: +.IP +doxygen [-s] \fB\-g\fR [configName] +.IP +If - is used for configName doxygen will write to standard output. +.TP +2) Use doxygen to update an old configuration file: +.IP +doxygen [-s] \fB\-u\fR [configName] +.TP +3) Use doxygen to generate documentation using an existing configuration file: +.IP +doxygen [configName] +.IP +If - is used for configName doxygen will read from standard input. +.TP +4) Use doxygen to generate a template style sheet file for RTF, HTML or Latex. +.TP +RTF: +doxygen \fB\-w\fR rtf styleSheetFile +.TP +HTML: +doxygen \fB\-w\fR html headerFile footerFile styleSheetFile [configFile] +.TP +LaTeX: doxygen \fB\-w\fR latex headerFile styleSheetFile [configFile] +.TP +5) Use doxygen to generate an rtf extensions file +.TP +RTF: +doxygen \fB\-e\fR rtf extensionsFile +.PP +If \fB\-s\fR is specified the comments in the config file will be omitted. +If configName is omitted `Doxyfile' will be used as a default. +.SH AUTHOR +Doxygen version 1.7.0, Copyright Dimitri van Heesch 1997-2007 +.SH SEE ALSO +doxytag(1), doxywizard(1). diff --git a/include/pg-doxy/tool/man/man1/doxytag.1 b/include/pg-doxy/tool/man/man1/doxytag.1 new file mode 100644 index 00000000..f4968991 --- /dev/null +++ b/include/pg-doxy/tool/man/man1/doxytag.1 @@ -0,0 +1,21 @@ +.TH DOXYTAG "1" "July 2010" "doxytag 1.7.0" "User Commands" +.SH NAME +doxytag \- generates a tag file and/or a search index for a set of HTML files +.SH SYNOPSIS +.B doxytag +[\fI-t tag_file\fR] [\fI-s index_file\fR] [ \fIhtml_file \fR[\fIhtml_file\fR...] ] +.SH DESCRIPTION +Generates a tag file and/or a search index for a set of HTML files. Use +doxysearch as a CGI program to search the tag file generated by doxytag. +.SH OPTIONS +.TP +\fB\-t\fR <tag_file> +Generate tag file <tag_file>. +.TP +\fB\-s\fR <index_file> +Generate search index <index_file>. +.PP +If no HTML files are given all files in the current dir that +have a .html extension are parsed. +.SH SEE ALSO +doxygen(1), doxywizard(1). diff --git a/include/simple_util.h b/include/simple_util.h new file mode 100755 index 00000000..e104a7df --- /dev/null +++ b/include/simple_util.h @@ -0,0 +1,89 @@ +/* + * aul + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com> + * + * 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 __SIMPLE_UTIL__ +#define __SIMPLE_UTIL__ + +#include <unistd.h> +#include <ctype.h> +#include <dlog.h> + +#ifdef LAUNCHPAD_LOG +#undef LOG_TAG +#define LOG_TAG "AUL_PAD" +#else +#undef LOG_TAG +#define LOG_TAG "AUL" +#endif +#ifdef AMD_LOG +#undef LOG_TAG +#define LOG_TAG "AUL_AMD" +#endif + + +#define MAX_LOCAL_BUFSZ 128 +#define MAX_PID_STR_BUFSZ 20 + +#define _E(fmt, arg...) LOGE(fmt, ##arg) +#define _D(fmt, arg...) LOGD(fmt, ##arg) + +#define retvm_if(expr, val, fmt, arg...) do { \ + if (expr) { \ + _E(fmt, ##arg); \ + _E("(%s) -> %s() return", #expr, __FUNCTION__); \ + return (val); \ + } \ +} while (0) + +#define retv_if(expr, val) do { \ + if (expr) { \ + _E("(%s) -> %s() return", #expr, __FUNCTION__); \ + return (val); \ + } \ +} while (0) + +int __proc_iter_cmdline(int (*iterfunc) + (const char *dname, const char *cmdline, void *priv), + void *priv); +int __proc_iter_pgid(int pgid, int (*iterfunc) (int pid, void *priv), + void *priv); +char *__proc_get_cmdline_bypid(int pid); + +static inline const char *FILENAME(const char *filename) +{ + const char *p; + const char *r; + + if (!filename) + return NULL; + + r = p = filename; + while (*p) { + if (*p == '/') + r = p + 1; + p++; + } + + return r; +} + +#endif |