upload tizen1.0 source
[framework/appfw/aul-1.git] / include / aul.h
1 /*
2  *  aul
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22
23 #ifndef __AUL_H__
24 #define __AUL_H__
25
26 #include <errno.h>
27 #include <bundle.h>
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 /**
34  * @mainpage
35  * 
36  * This is new version of Application Utility Library 
37  *
38  * Almost function's input param is application package name(APN).\n
39  * APN is application package name which is set by developer.\n
40  * In case of in-house application, prefix is org.tizen.\n
41  * It is different from debian package name.\n
42  * 
43  * - Debian Package Name : Name which is managed by package manager
44  * - Application Package Name : Name which is used by AUL
45  * - Execution Path : real program executable path
46  */
47
48 /**
49  * @open
50  * @ingroup APPLICATION_FRAMEWORK
51  * @defgroup aul  Application Utility Library
52  * @{
53  */
54
55         
56 /**
57  * @file        aul.h
58  * @brief       Application Utility Library header
59  *
60  * Patched by    Knhoon Baik <knhoon.baik@samsung.com>
61  * Patched by    Youmin Ha   <youmin.ha@samsung.com>
62  */
63
64 /**
65  * @addtogroup aul
66  * @{
67  */
68         
69 /**
70  * @brief Return values in AUL. 
71  */
72 typedef enum _aul_return_val {
73         AUL_R_LOCAL = -7,               /**< Launch by himself */
74         AUL_R_ETIMEOUT = -6,            /**< Timeout */
75         AUL_R_ECANCELED = -5,           /**< Operation canceled */
76         AUL_R_EINVAL = -4,              /**< Invalid argument */
77         AUL_R_ECOMM = -3,               /**< Comunication Error */
78         AUL_R_ENOINIT = -2,             /**< AUL handler NOT initialized */
79         AUL_R_ERROR = -1,               /**< General error */
80         AUL_R_OK = 0                    /**< General success */
81 }aul_return_val;
82
83 /** @} */ 
84
85 /**
86  * @defgroup aul_launch         Primitive APIs to launch/resume/terminate application 
87  * @ingroup aul
88  * @brief
89  *      APIs to launch/resume/terminate application 
90  *      - Launch application based on application package name
91  *      - Resume application based on application package name
92  *      - Resume application based on pid (required root or inhouse permisssion)
93  *      - Terminate application base on pid (required root or inhouse permission)
94  *
95  *      AUL internal information
96  *      - AUL grant pid, gid to launched application for security
97  *      - AUL send RESET/RESUME/TERM event for running application in case of single instance
98  *      - AUL set application enviroment based on desktop entry
99  *      - AUL support single instance / multi instance 
100  *      - AUL support application data exchange format (bundle)
101  */
102
103 /**
104  * @addtogroup aul_launch 
105  * @{
106  */
107
108 typedef enum _aul_type{
109         AUL_START,
110         AUL_RESUME,
111         AUL_TERMINATE
112 }aul_type;
113
114 /** AUL internal private key */
115 #define AUL_K_PKG_NAME          "__AUL_PKG_NAME__"
116 /** AUL internal private key */
117 #define AUL_K_WAIT_RESULT       "__AUL_WAIT_RESULT__"
118 /** AUL internal private key */
119 #define AUL_K_SEND_RESULT       "__AUL_SEND_RESULT__"
120 /** AUL internal private key */
121 #define AUL_K_TASK_MANAGE       "__AUL_TASK_MANAGE__"
122 /** AUL internal private key */
123 #define AUL_K_APP_TYPE          "__AUL_APP_TYPE__"
124 /** AUL internal private key - To check original caller's identity */
125 #define AUL_K_ORG_CALLER_PID    "__AUL_ORG_CALLER_PID__"
126 /** AUL internal private key - To check forwarded callee app's pid */
127 #define AUL_K_FWD_CALLEE_PID    "__AUL_FWD_CALLEE_PID__"
128
129 /** AUL public key - To check caller's secuirty */
130 #define AUL_K_CALLER_PID        "__AUL_CALLER_PID__"
131 /** AUL public key - To check callee's secuirty */
132 #define AUL_K_CALLEE_PID        "__AUL_CALLEE_PID__"
133
134 /** AUL public key - To find argv0 */ 
135 #define AUL_K_ARGV0             "__AUL_ARGV0__"
136 /** AUL public key - To measure launching time */
137 #define AUL_K_STARTTIME         "__AUL_STARTTIME__"
138
139 /** AUL public key - To support launching based on mime type */
140 #define AUL_K_MIME_TYPE         "__AUL_MIME_TYPE__"
141 /** AUL public key - To support launching based on mime type */
142 #define AUL_K_UNALIASED_MIME_TYPE               "__AUL_UNALIASED_MIME_TYPE__"
143 /** AUL public key - To support launching based on mime type */
144 #define AUL_K_MIME_CONTENT      "__AUL_MIME_CONTENT__"
145
146 /** AUL public key - To support launching based on service */
147 #define AUL_K_SERVICE_NAME              "__AUL_SERVICE_NAME__"
148
149 /** AUL public key - To force launch app selector instead of lauchingn default app */
150 #define AUL_K_FORCE_LAUNCH_APP_SELECTOR "__AUL_FORCE_LAUNCH_APP_SELECTOR__"
151
152 /** AUL public key - To support SDK */
153 #define AUL_K_SDK       "__AUL_SDK__"
154
155 /** 
156  * @brief       This is callback function for aul_launch_init
157  * @param[in]   type    event's type received from system
158  * @param[in]   b       In case of RESET events, bundle which is received from peer
159  * @param[in]   data    user-supplied data
160  */
161 typedef int (*aul_handler_fn) (aul_type type, bundle * b, void *data);
162
163 /**
164  * @par Description:
165  *      This API install your AUL handler and setup AUL internal connection.
166  * @par Purpose:
167  *      AUL receive START(RESET), RESUME, TERMINATE events from system.\n
168  *      This API use to handle the events. \n
169  * @par Typical use case:
170  *      In general, you need not use this API.
171  *      If you use AppCore, you should NOT use this API.
172  *      AppCore will set default aul_handler.
173  *              
174  * @param[in]   handler         aul main callback handler function
175  * @param[in]   data            user-supplied data for start_handler
176  * @return      0 if success, negative value(<0) if fail\n
177  * @retval      AUL_R_OK        - success
178  * @retval      AUL_R_ECANCELD  - aul handler was installed already by others
179  * @retval      AUL_R_ECOMM     - error to create internal ipc
180  * @retval      AUL_R_ERROR     - error to attach glib main loop or ecore main loop
181  *              
182  * @warning     If you use AppCore, you should NOT use this API.\n
183  *              You need glib main loop or ecore main loop.\n
184  * @pre
185  *      you must have aul handler to use this API.
186  *      aul_luanch_init register aul handler.
187  * @post 
188  *      None
189  * @see 
190  *      None    
191  * @code
192  * #include <aul.h>
193  * #include <bundle.h>
194  *
195  * static int aul_handler(aul_type type, bundle *kb,void *data)
196  * {
197  *      switch(type)
198  *      {
199  *              case AUL_START:
200  *                      // process RESET event
201  *                      break;
202  *              case AUL_RESUME:
203  *                      // process RESUME event
204  *                      break;
205  *              case AUL_TERMINATE:
206  *                      // preocess TERMINATE event
207  *                      break;
208  *      }
209  *      return 0;
210  * }
211  *
212  * int main(int argc, char **argv)
213  * {
214  *      ecore_init();
215  *      aul_launch_init(aul_handler,NULL);
216  *      aul_launch_argv_handler(argc, argv);
217  *      ecore_main_loop_begin();
218  * }
219  * 
220  * @endcode
221  * @remark
222  *      None
223 */
224 int aul_launch_init(aul_handler_fn handler, void *data);
225
226 /**
227  * @par Description:
228  *      This API create internal RESET events with given argc, argv \n
229  * @par Purpose:
230  *      This API's purpose is to generate reset event.
231  *      If you want to generate local RESET events with argument vector format, use this API
232  * @par Typical use case:
233  *      In general, you need not use this API.
234  *      AppCore use this API to create internal reset event.
235  *
236  * @param[in]   argc    # of args
237  * @param[in]   argv    list of arg strings
238  * @return      0 if success, negative value(<0) if fail
239  * @retval      AUL_R_OK        - success
240  * @retval      AUL_R_ENOINIT   - aul handler was NOT yet installed
241  * @retval      AUL_R_ECANCLED  - error to create internal bundle with given argc,argv.
242  * @retval      AUL_R_ERROR     - general error 
243  *
244  * @pre
245  *      you must have aul handler to use this API.
246  *      aul_luanch_init register aul handler.
247  * @post 
248  *      None
249  * @see 
250  *      aul_launch_init
251  * @code
252  * #include <aul.h>
253  * #include <bundle.h>
254  * 
255  * int send_local_reset_event()
256  * { 
257  *      int argc=3;
258  *      char* argv[4];
259  *      argv[0] = "local.app";
260  *      argv[1] = "event_type";
261  *      argv[2] = "my_reset";
262  *      argv[3] = NULL;
263  *      aul_launch_argv_handler(argc,argv);
264  * }
265  *
266  * @endcode
267  * @remark
268  *      If you use AppCore, you NEED NOT use this API.
269 */
270 int aul_launch_argv_handler(int argc, char **argv);
271
272 /**
273  * @par Description:
274  *      This API creates internal RESET events with given bundle \n
275  * @par Purpose:
276  *  This API's purpose is to generate reset event.
277  *  If you want to generate local RESET events with argument vector format, first use 
278  *  bundle_import_from_argv to create a bundle from the argument vector and then use this API
279  *  Eventually, this API will replace aul_launch_argv_handler().
280  * @par Typical use case:
281  *      In general, you need not use this API.
282  *      AppCore use this API to create internal reset event.
283  *
284  * @param[in]   b       bundle
285  * @return      0 if success, negative value(<0) if fail
286  * @retval      AUL_R_OK        - success
287  * @retval      AUL_R_ENOINIT   - aul handler was NOT yet installed
288  * @retval      AUL_R_ERROR     - general error 
289  *
290  * @pre
291  *      you must have aul handler to use this API.
292  *      aul_luanch_init register aul handler.
293  * @post 
294  *      None
295  * @see 
296  *      aul_launch_init, bundle_import_from_argv
297  * @code
298  * #include <aul.h>
299  * #include <bundle.h>
300  * 
301  * int send_local_reset_event()
302  * { 
303  *  bundle* b;
304  *      int argc=3;
305  *      char* argv[4];
306  *      argv[0] = "local.app";
307  *      argv[1] = "event_type";
308  *      argv[2] = "my_reset";
309  *      argv[3] = NULL;
310  *
311  *      b = bundle_import_from_argv(argc,argv);
312  *      aul_launch_local(b);
313  * }
314  *
315  * @endcode
316  * @remark
317  *      If you use AppCore, you NEED NOT to use this API.
318 */
319 int aul_launch_local(bundle *b);
320
321 /**
322  * @par Description:
323  *      This API launches application with the given bundle. 
324  *  If the application is not running or a multiple-instance one, this API launches with the given bundle.
325  *      If the application is running, this API sends a RESET event to the App.
326  *      While the application is running, if the application cannot receive the RESET event, 
327  *      this API returns a general error(AUL_R_ERROR).\n
328  * @par Purpose:
329  *      This API is for caller.
330  *      This API's purpose is to launch/reset application with given bundle.
331  * @par Typical use case:
332  *      If you know the target application's pkgname and bundle types, 
333  *      you can use this API to launch/reset the application.
334  *
335  * @param[in]   pkgname         package name to be run as callee
336  * @param[in]   kb              bundle to be passed to callee
337  * @return      callee's pid if success, negative value(<0) if fail
338  * @retval      AUL_R_OK        - success
339  * @retval      AUL_R_EINVAL    - invaild package name 
340  * @retval      AUL_R_ECOM      - internal AUL IPC error
341  * @retval      AUL_R_ERROR     - general error 
342  * 
343  * @pre
344  *      None
345  * @post 
346  *      None
347  * @see 
348  *      aul_open_app
349  * @code
350  * #include <aul.h>
351  * #include <bundle.h>
352  * 
353  * int launch_inhouse_contact_app()
354  * { 
355  *      bundle *b;
356  *      b = bundle_create();
357  *      bundle_add(b,"type","SIM");
358  *      aul_launch_app("org.tizen.contact",b);
359  * }
360  *
361  * @endcode
362  * @remark
363  *      None
364  */
365 int aul_launch_app(const char *pkgname, bundle *kb);
366
367 /**
368  * @par Description:
369  *  This API launches application, as menu screen launches the app.
370  *  Thus, if the applocation is running, this API sends a RESUME event to the app.
371  *  If the application is not running, this API launches the app.
372  *  While the application is running, if the application cannot receive the RESUME event,
373  *  AUL tries to raise the application's default window.
374  *
375  * @par Purpose:
376  *      This API is for caller.
377  *      This API's purpose is to resume/launch application
378  * @par Typical use case:
379  *      If you only want to show application with previous state or default state, Use this API.
380  *              
381  * @param[in]   pkgname         package name to be resume as callee
382  * @return      callee's pid if success, negative value(<0) if fail
383  * @retval      AUL_R_OK        - success
384  * @retval      AUL_R_EINVAL    - invaild package name 
385  * @retval      AUL_R_ECOM      - internal AUL IPC error
386  * @retval      AUL_R_ERROR     - general error 
387  *
388  * @pre
389  *      None
390  * @post 
391  *      None
392  * @see 
393  *      aul_launch_app, aul_app_is_running, aul_resume_pid
394  * @code
395  * #include <aul.h>
396  * #include <bundle.h>
397  * 
398  * int open_inhouse_contact_app()
399  * { 
400  *      if(aul_app_is_running("org.tizen.contact"))
401  *              aul_open_app("org.tizen.contact");
402  * }
403  *
404  * @endcode
405  * @remark
406  *      If you don't want to launch the app, 
407  *      you should check app's running state with aul_app_is_running.
408  *      This API will launch the application if the application is not running.
409 */
410 int aul_open_app(const char *pkgname);
411
412 /**
413  * @par Description:
414  *      This API trigger to resume application 
415  *      If the application is running, this API send a resume event to the App.
416  *      If the application is not running or multiple instance, this API launch App. with bundle.
417  *      Although the application is running, if the application cannot receive resume event, 
418  *      AUL try to raise the application's default windows.
419  * @par Purpose:
420  *      This API is for caller.
421  *      This API's purpose is to send resume event or to launch application
422  * @par Typical use case:
423  *      If you only want to show application with previous state or default state, Use this API.
424  *              
425  * @param[in]   pkgname         package name to be resume as callee
426  * @param[in]   kb              bundle to be passed to callee in case of launching app
427  * @return      callee's pid if success, negative value(<0) if fail
428  * @retval      AUL_R_OK        - success
429  * @retval      AUL_R_EINVAL    - invaild package name 
430  * @retval      AUL_R_ECOM      - internal AUL IPC error
431  * @retval      AUL_R_ERROR     - general error 
432  *
433  * @pre
434  *      None
435  * @post 
436  *      None
437  * @see 
438  *      aul_launch_app, aul_app_is_running, aul_resume_pid
439  * @deprecated
440  *  This function will be deprecated. Use aul_open_add() instead.
441  * @code
442  * #include <aul.h>
443  * #include <bundle.h>
444  * 
445  * int resume_inhouse_contact_app()
446  * { 
447  *      if(aul_app_is_running("org.tizen.contact"))
448  *              aul_resume_app("org.tizen.contact",NULL);
449  * }
450  *
451  * @endcode
452  * @remark
453  *      If you don't want to launch the app, 
454  *      you should check app's running state with aul_app_is_running.
455  *      This API will launch the application if the application is not running.
456  *      If you want to only resume without launching in multiple instance application model,
457  *      you should use aul_resume_pid.
458 */
459 int aul_resume_app(const char *pkgname, bundle *kb)
460             __attribute__ ((__deprecated__));
461
462 /**
463  * @par Description:
464  *      This API trigger to resume application 
465  *      If the application is running, this API send a resume event to the App.
466  *      If the application is not running, this API return AUL_R_ERROR.
467  *      Although the application is running, if the application cannot receive resume event, 
468  *      AUL try to raise the application's default windows.
469  * @par Purpose:
470  *      This API is for caller.
471  *      This API's purpose is to send resume event.
472  * @par Typical use case:
473  *      In multiple application model, If you want to only resume specific application, Use this API
474  *
475  * @param[in]   pid     application's pid to be resumed
476  * @return      0 if success, negative value(<0) if fail
477  * @retval      AUL_R_OK        - success
478  * @retval      AUL_R_EINVAL    - invaild pid 
479  * @retval      AUL_R_ECOM      - internal AUL IPC error
480  * @retval      AUL_R_ERROR     - general error (include application is not running) 
481  * @warning     This API need to require root or inhouse permisssion \n
482  *              If you have not the permission, this API return AUL_R_ERROR. \n
483  * @pre
484  *      None
485  * @post 
486  *      None
487  * @see 
488  *      aul_launch_app
489  * @code
490  * #include <aul.h>
491  * #include <bundle.h>
492  * 
493  * int iterfunc(const aul_app_info *info, void *data)
494  * {
495  *      if(strcmp(info->pkg_name,"org.tizen.contact")==0)
496  *              aul_resume_pid(info->pid);
497  * }
498  *
499  * int iterate_running_apps()
500  * { 
501  *      return aul_app_get_running_app_info(iterfunc,NULL);
502  * }
503  *
504  * @endcode
505  * @remark
506  *      None
507 */
508 int aul_resume_pid(int pid);
509
510 /**
511  * @par Description:
512  *      This API trigger to terminate application 
513  * 
514  *      If the application is running, this API send a terminate event to the App. \n
515  *      If the app cannot receive the event, AUL kill forcely the application.\n
516  * @par Purpose:
517  *      This API's purpose is to kill application 
518  * @par Typical use case:
519  *      In general, Application like Task Manager use this API.
520  *      
521  *              This API need to require root or inhouse permisssion. \n
522  *
523  * @param[in]   pid     application's pid to be terminated 
524  * @return      0 if success, negative value(<0) if fail
525  * @retval      AUL_R_OK        - success
526  * @retval      AUL_R_EINVAL    - invaild pid 
527  * @retval      AUL_R_ECOM      - internal AUL IPC error
528  * @retval      AUL_R_ERROR     - general error 
529  * @warning     This API need to require root or inhouse permisssion. \n
530  *
531  * @pre
532  *      None
533  * @post 
534  *      None
535  * @see 
536  *      None    
537  * @code
538  * #include <aul.h>
539  * #include <bundle.h>
540  * 
541  * int iterfunc(const aul_app_info *info, void *data)
542  * {
543  *      if(strcmp(info->pkg_name,"org.tizen.contact")==0)
544  *              aul_terminate_pid(info->pid);
545  * }
546  *
547  * int iterate_running_apps()
548  * { 
549  *      return aul_app_get_running_app_info(iterfunc,NULL);
550  * }
551  *
552  * @endcode
553  * @remark
554  *      If you have not the permission, this API return AUL_R_ERROR. \n
555 */
556 int aul_terminate_pid(int pid);
557
558 /** @} */
559
560 /**
561  * @defgroup aul_info           Helper APIs to get running application information
562  * @ingroup aul
563  * @brief
564  *      API to get running application information (state, executable path, ..)
565  *      - get application package name from pid
566  *      - get application running state
567  *      - get application list of runnning applications
568  */
569
570 /**
571  * @addtogroup aul_info
572  * @{
573  */
574
575 /** 
576  *@brief Running application's information structure retrieved by AUL 
577  */
578 typedef struct _aul_app_info {
579         int pid;                /**< app's pid if running*/
580         char* pkg_name;         /**< APN (application package name) */
581         char* app_path;         /**< application excutable path */
582 } aul_app_info;
583
584 /** 
585  * @brief iterator function running with aul_app_get_running_app_info 
586  * @param[out]  ainfo   aul_app_info retreived by aul_app_get_running_app_info
587  * @param[out]  data    user-supplied data      
588 */
589 typedef int (*aul_app_info_iter_fn)(const aul_app_info *ainfo, void *data);
590
591 /**
592  * @par Description:
593  *      This API ask a application is running by application package name.
594  * @par Purpose:
595  *      To know whether some application is running or not, use this API
596  * @par Typical use case:
597  *      For example, If you want to know browser application running, 
598  *      you can check it by using this API.
599  *
600  * @param[in]   pkgname application package name
601  * @return      true / false
602  * @retval      1       app_name is running now.
603  * @retval      0       app_name is NOT running now.
604  *
605  * @pre
606  *      None
607  * @post 
608  *      None
609  * @see 
610  *      None
611  * @code
612  * #include <aul.h>
613  *
614  * int is_running_browser_app()
615  * { 
616  *      return aul_app_is_running("org.tizen.browser");
617  * }
618  *
619  * @endcode
620  * @remark
621  *      None
622
623 */
624 int aul_app_is_running(const char *pkgname);
625
626 /**
627  * @par Description:
628  *      This API use to get running application list.
629  *      This API call iter_fn with each aul_app_info of running apps when running application is found.
630  * @par Purpose:
631  *      If you want to get running application list, use this API
632  *      This API give you running applications which has SLP desktop file.
633  * @par Typical use case:
634  *      In general, this API is used by task manager appllication. (running application list viewer)
635  *
636  * @param[in]   iter_fn         iterator function
637  * @param[in]   data            user-supplied data for iter_fn
638  * @return      0 if success, negative value(<0) if fail
639  * @retval      AUL_R_OK        - success
640  * @retval      AUL_R_ERROR     - internal error
641  *
642  * @pre
643  *      None
644  * @post 
645  *      None
646  * @see 
647  *      None
648  * @code
649  * #include <aul.h>
650  *
651  * int iterfunc(const aul_app_info* info, void* data)
652  * {
653  *      printf("\t==========================\n");
654  *      printf("\t pkg_name: %s\n", info->pkg_name);
655  *      printf("\t app_path: %s\n", info->app_path);
656  *      printf("\t running pid: %d\n", info->pid);
657  *      printf("\t==========================\n");
658  *      return 0;
659  * }
660  *
661  * int iterate_running_apps()
662  * { 
663  *      return aul_app_get_running_app_info(iterfunc,NULL);
664  * }
665  *
666  * @endcode
667  * @remark
668  *      This API should use if you want to know running application which has desktop files.
669  *      If you want to get all process list, you must iterate process information by using proc filesystem
670  *      Or, If you want to get all window list, you must iterate XWindows by using XWindow APIs
671  */
672 int aul_app_get_running_app_info(aul_app_info_iter_fn iter_fn, void *data);
673
674 /**
675  * @par Description:
676  *      This API get application package name by pid
677  * @par Purpose:
678  *      If you want to get package name of running application, use this API 
679  * @par Typical use case:
680  *      In general, You can use this API when you want to know caller's information.
681  *
682  * @param[in]   pid             given pid
683  * @param[out]  pkgname         pkgname to be get
684  * @param[in]   len             length of pkgname
685  * @return      0 if success, negative value(<0) if fail
686  * @retval      AUL_R_OK        - success
687  * @retval      AUL_R_ERROR     - no such a package name 
688  * @pre
689  *      None
690  * @post 
691  *      None
692  * @see 
693  *      None
694  * @code
695  * #include <aul.h>
696  * #include <bundle.h>
697  *
698  * static int app_reset(bundle *b, void *data) 
699  * { 
700  *      int pid;
701  *      char appname[255];
702  *
703  *      pid = atoi(bundle_get_val(b,AUL_K_CALLER_PID));
704  *      aul_app_get_pkgname_bypid(pid, appname, sizeof(appname));
705  * }
706  *
707  * @endcode
708  * @remark
709  *      None
710 */
711 int aul_app_get_pkgname_bypid(int pid, char *pkgname, int len);
712
713 /** @} */
714
715 /**
716  * @defgroup aul_mime High-level APIs to launch default application based on mime type 
717  * @ingroup aul
718  * @brief
719  *   AUL High-level APIs based on mime type
720  *
721  *   These APIs provide two functionality\n
722  *   
723  *   -# To launch default application to open a file based on its MIME type \n
724  *   For example, you can launch the default video player to open .mp4 files 
725  *   or launch the default browser to open HTML files \n
726  *   -# To launch default application to process given content \n
727  *   For example, you can launch the default e-mail application to process
728  *   "nice@samsung.com" e-mail address.
729  */
730
731 /**
732  * @addtogroup aul_mime
733  * @{
734  */
735
736 /**
737  * @par Description:
738  *      This API launch application associated with given filename
739  * @par Purpose:
740  *      This API is for caller.
741  *      This API launch application based on mime type.
742  *      This API find mime_type associated with file name,
743  *      and then find default app associated with found mime_type
744  *      and then launch the app with filename argument.
745  * @par Typical use case:
746  *      You can launch application to process given filename.
747  *      That is, Even if you don't know the specific application's pkgname, 
748  *      you can launch the applicaiton processing given filename . 
749  *      For example, If you want to process image file, you can simply launch image viewer. 
750  *      At that time, you can use this APIs like aul_open_file("myimage.jpg");
751  *
752  * @param[in]   filename        filename
753  * @return      callee's pid or 0 if success, negative value if fail\n
754  *              (when no found default app, return 0)
755  * @retval      AUL_R_OK        - success
756  * @retval      AUL_R_EINVAL    - invalid argument(filename)
757  * @retval      AUL_R_ECOM      - internal AUL IPC error
758  * @retval      AUL_R_ERROR     - general error 
759  *
760  * @pre
761  *      None
762  * @post 
763  *      None
764  * @see 
765  *      None
766  * @code
767  * #include <aul.h>
768  *
769  * int view_image_file(char *filename)
770  * { 
771  *      aul_open_file(filename);
772  * }
773  *
774  * @endcode
775  * @remark
776  *      None
777  * 
778  */
779 int aul_open_file(const char* filename) __attribute__((deprecated));
780
781 /**
782  * @par Description:
783  *      This API launch application associated with given specific mimetype
784  * @par Purpose:
785  *      This API is for caller.
786  *      This API launch application based on mime type like aul_open_file API.
787  *      But, This API don't find mime_type associated with file name.
788  *      This API use mimetype given by user. By using given mimetype, find default application.
789  *      and then launch the app with filename argument.
790  * @par Typical use case:
791  *      Some files cannot extract exact mimetype automatically.
792  *      For example, To know mime type of files with DRM lock, first we should unlock DRM file.
793  *      In this case, You can use this API.
794  *      First, unlock DRM file, and extract mimetype from unlock file by using aul_get_mime_from_file,
795  *      and then, use this API with DRM file and extracted mime type. 
796  *
797  * @param[in]   filename        filename
798  * @param[in]   mimetype        specific mimetype
799  * @return      callee's pid or 0 if success, negative value if fail\n
800  *              (when no found default app, return 0)
801  * @retval      AUL_R_OK        - success
802  * @retval      AUL_R_EINVAL    - invalid argument(filename,mimetype)
803  * @retval      AUL_R_ECOM      - internal AUL IPC error
804  * @retval      AUL_R_ERROR     - general error 
805  * 
806  * @pre
807  *      None
808  * @post 
809  *      None
810  * @see 
811  *      aul_open_file, aul_get_mime_from_file
812  * @code
813  * #include <aul.h>
814  *
815  * int view_drm_image_file(char *drm_filename)
816  * { 
817  *      char* mimetype;
818  *      // you must implement this function
819  *      mimetype = get_mimetype_from_drmfile(drm_filename);
820  *
821  *      aul_open_file_with_mimetype(drm_filename,mimetype);
822  * }
823  *
824  * @endcode
825  * @remark
826  *      None
827  */
828 int aul_open_file_with_mimetype(const char *filename, const char *mimetype) __attribute__((deprecated));
829
830 /**
831  * @par Description:
832  *      This API launch application associated with content like "http://www.samsung.com"
833  * @par Purpose:
834  *      This API is for caller.
835  *      This API launch application based on mime type.
836  *      This API find mime_type associated with content,
837  *      and then find default app associated with found mime_type,
838  *      and then launch the app with content argument.
839  * @par Typical use case:
840  *      You can launch application to process given content. 
841  *      That is, Even if you don't know the specific application's pkgname, 
842  *      you can launch the applicaiton processing given content.  
843  *      For example, If you want to process URL "http://www.samsung.com", 
844  *      you can simply launch browser. 
845  *      At that time, you can use this APIs like aul_open_content("http://www.samsung.com");
846  *
847  * @param[in]   content         content 
848  * @return      callee's pid or 0 if success, negative value if fail\n
849  *              (when no found default app, return 0)
850  * @retval      AUL_R_OK        - success
851  * @retval      AUL_R_EINVAL    - invalid argument(content)
852  * @retval      AUL_R_ECOM      - internal AUL IPC error
853  * @retval      AUL_R_ERROR     - general error or no found mimetype
854  *
855  * @pre
856  *      None
857  * @post 
858  *      None
859  * @see 
860  *      None
861  * @code
862  * #include <aul.h>
863  *
864  * int view_url(char *url)
865  * { 
866  *      aul_open_content(url);
867  * }
868  *
869  * @endcode
870  * @remark
871  *      None
872  * 
873  */
874 int aul_open_content(const char* content) __attribute__((deprecated));
875
876 /**
877  * @par Description:
878  *       This API get the default application(package name) associated with MIME type
879  * @par Purpose:
880  *      This API use to get default application associteted with mimetype 
881  *      In general, Setting Application need this API. 
882  * @par Typical use case:
883  *      Setting Application show mapping of default application / mimetype
884  *
885  * @param[in]   mimetype        a mime type
886  * @param[out]  defapp          a application package name of the app
887  * @param[in]   len             length of defapp
888  * @return      0 if success, negative value if fail
889  * @retval      AUL_R_OK        - success
890  * @retval      AUL_R_EINVAL    - invalid argument(mimetype)
891  * @retval      AUL_R_ERROR     - general error or no found mimetype
892  *
893  * @pre
894  *      None
895  * @post 
896  *      None
897  * @see 
898  *      aul_set_defapp_with_mime
899  * @code
900  * #include <aul.h>
901  * 
902  * void get_text_html_defapp()
903  * {
904  *      char appname[255];
905  *      aul_get_defapp_from_mime("text/html",appname,sizeof(appname));
906  * }
907  * 
908  * @endcode
909  * @remark
910  *      None
911  * 
912  */
913 int aul_get_defapp_from_mime(const char *mimetype, char *defapp, int len) __attribute__((deprecated));
914
915 /**
916  * @par Description:
917  *       This API set the default application(package name) associated with MIME type
918  * @par Purpose:
919  *      This API use to change default application associteted with mimetype 
920  *      In general, Setting Application or Installer need this API. 
921  * @par Typical use case:
922  *      Default Application associated with mimetype can be changed by Setting Application or installer 
923  *      So, application to process specific mimetype can be substituted. 
924  *
925  * @param[in]   mimetype        a mime type
926  * @param[in]   defapp          a application package name of the app to be set
927  * @return      0 if success, negative value if fail
928  * @retval      AUL_R_OK        - success
929  * @retval      AUL_R_EINVAL    - invalid argument(mimetype)
930  * @retval      AUL_R_ERROR     - general error 
931  *
932  * @pre
933  *      None
934  * @post 
935  *      None
936  * @see 
937  *      aul_get_defapp_from_mime
938  * @code
939  * #include <aul.h>
940  * 
941  * void set_text_html_defapp()
942  * {
943  *      aul_set_defapp_with_mime("text/html","org.tizen.browser");
944  * }
945  * 
946  * @endcode
947  * @remark
948  *      None
949 */
950 int aul_set_defapp_with_mime(const char *mimetype, const char *defapp) __attribute__((deprecated));
951
952 /**
953  * @par Description:
954  *      This API get the mimetype associated with filename
955  * @par Purpose:
956  *      This API use to get mimetype associteted with given filename 
957  *      In general, This API use when you want to know only mimetype given filename.
958  * @par Typical use case:
959  *      For example, In trasfering data through bluetooth, 
960  *      additional information like mimetype should be added.
961  *      In such situation, You can get mimetype by using this API.
962  *      
963  * @param[in]   filename        file name 
964  * @param[out]  mimetype        a mime type
965  * @param[in]   len             length of mimetype 
966  * @return      0 if success, negative value if fail
967  * @retval      AUL_R_OK        - success
968  * @retval      AUL_R_EINVAL    - invalid argument(filename)
969  * @retval      AUL_R_ERROR     - general error 
970  * 
971  * @pre
972  *      None
973  * @post 
974  *      None
975  * @see 
976  *      None
977  * @code
978  * #include <aul.h>
979  * 
980  * void get_mimetype()
981  * {
982  *      char mimetype[255];
983  *      aul_get_mime_from_file("image.jpg",mimetype,sizeof(mimetype));
984  * }
985  * 
986  * @endcode
987  * @remark
988  *      None
989  */
990 int aul_get_mime_from_file(const char *filename, char *mimetype, int len);
991
992 /**
993  * @par Description:
994  *      This API get the mimetype associated with given content 
995  * @par Purpose:
996  *      This API use to get mimetype associteted with given content 
997  *      In general, This API use when you want to know only mimetype given content 
998  * @par Typical use case:
999  *      For example, In trasfering data through bluetooth, 
1000  *      additional information like mimetype should be added.
1001  *      In such situation, You can get mimetype by using this API.
1002  *
1003  * @param[in]   content         content string like "011-0000-0000" 
1004  * @param[out]  mimetype        a mime type
1005  * @param[in]   len             length of mimetype 
1006  * @return      0 if success, negative value if fail
1007  * @retval      AUL_R_OK        - success
1008  * @retval      AUL_R_EINVAL    - invalid argument(content)
1009  * @retval      AUL_R_ERROR     - general error 
1010  *
1011  * @pre
1012  *      None
1013  * @post 
1014  *      None
1015  * @see 
1016  *      None
1017  * @code
1018  * #include <aul.h>
1019  * 
1020  * void get_mimetype()
1021  * {
1022  *      char mimetype[255];
1023  *      aul_get_mime_from_content("http://www.samsung.com",mimetype,sizeof(mimetype));
1024  * }
1025  * 
1026  * @endcode
1027  * @remark
1028  *      None
1029 */
1030 int aul_get_mime_from_content(const char *content, char *mimetype, int len);
1031
1032 /**
1033  * @par Description:
1034  *      This API get the icon's name associated with given mimetype 
1035  * @par Purpose:
1036  *      This API use to get icon's name associteted with given mimetype
1037  * @par Typical use case:
1038  *      If you want to show mimetype's icon, use this API.
1039  *
1040  * @param[in]   mimetype        a mime type
1041  * @param[out]  iconname        icon's name
1042  * @param[in]   len             length of iconname
1043  * @return      0 if success, negative value if fail
1044  * @retval      AUL_R_OK        - success
1045  * @retval      AUL_R_EINVAL    - invalid argument(content)
1046  * @retval      AUL_R_ERROR     - general error (no such mime type) 
1047  *
1048  * @pre
1049  *      None
1050  * @post 
1051  *      None
1052  * @see 
1053  *      None
1054  * @code
1055  * #include <aul.h>
1056  * 
1057  * void get_mime_icon()
1058  * {
1059  *      char icon[255];
1060  *      aul_get_mime_icon("text/html",icon,sizeof(icon));
1061  * }
1062  * 
1063  * @endcode
1064  * @remark
1065  *      None
1066  */
1067 int aul_get_mime_icon(const char *mimetype, char *iconname, int len);
1068
1069 /**
1070  * @par Description:
1071  *      This API get the extensions associated with given mimetype 
1072  * @par Purpose:
1073  *      This API use to get extensions associteted with given mimetype
1074  * @par Typical use case:
1075  *      In general, user is not familiar with mimetype(text/html),
1076  *      user is familiar with extenstions(*.html, *.htm)
1077  *      So, To show mimetype information to user, use this API
1078  *
1079  * @param[in]   mimetype        a mime type
1080  * @param[out]  extlist         extentions (ex> mpeg,mpg,mpe)
1081  * @param[in]   len             length of extlist
1082  * @return      0 if success, negative value if fail
1083  * @retval      AUL_R_OK        - success
1084  * @retval      AUL_R_EINVAL    - invalid argument(mimetype)
1085  * @retval      AUL_R_ERROR     - general error (no mimetype or no extenstion) 
1086  *
1087  * @pre
1088  *      None
1089  * @post 
1090  *      None
1091  * @see 
1092  *      aul_get_mime_description
1093  * @code
1094  * #include <aul.h>
1095  * 
1096  * void get_extension()
1097  * {
1098  *      char extlist[255];
1099  *      aul_get_mime_extension("text/html",extlist,sizeof(extlist));
1100  * }
1101  * 
1102  * @endcode
1103  * @remark
1104  *      Some mimetype don't have extension.
1105  *      In that case, You can use aul_get_mime_description.
1106  * 
1107 */
1108 int aul_get_mime_extension(const char *mimetype, char *extlist, int len);
1109
1110 /**
1111  * @par Description:
1112  *      This API get the description associated with given mimetype 
1113  * @par Purpose:
1114  *      This API use to get description associteted with given mimetype
1115  * @par Typical use case:
1116  *      In general, user is not familiar with mimetype(text/html),
1117  *      user is familiar with well-knowing information like extenstions(*.html, *.htm)
1118  *      But, some mimetype don't have extenstion.
1119  *      At that time,to show mimetype information to user, use this API
1120  *
1121  * @param[in]   mimetype        a mime type
1122  * @param[out]  desc            description (ex> Call client)   
1123  * @param[in]   len             length of desc
1124  * @return      0 if success, negative value if fail
1125  * @retval      AUL_R_OK        - success
1126  * @retval      AUL_R_EINVAL    - invalid argument(mimetype)
1127  * @retval      AUL_R_ERROR     - general error (no mimetype or no descrition) 
1128  *
1129  * @pre
1130  *      None
1131  * @post 
1132  *      None
1133  * @see 
1134  *      aul_get_mime_extension
1135  * @code
1136  * #include <aul.h>
1137  * 
1138  * void get_information_from_mime()
1139  * {
1140  *      char info[255];
1141  *      if(aul_get_mime_extension("text/html",info,sizeof(info))<0){
1142  *              aul_get_mime_description("text/html",info,sizeof(info));
1143  *      }
1144  * }
1145  * 
1146  * @endcode
1147  * @remark
1148  *      None 
1149  */
1150 int aul_get_mime_description(const char *mimetype, char *desc, int len);
1151
1152 /************************************************************************************************/
1153 /* Example of aul_open_content or aul_open_file                                                 */
1154 /* voice call , browser , docview , image viewer , audio player, video player                   */
1155 /*                                                                                              */
1156 /* voice call - aul_open_content("callto://011-1111-1111");                                     */
1157 /* browser -    aul_open_content("http://www.naver.com");                                       */
1158 /*         -    aul_open_file("/opt/share/index.html");                                         */
1159 /* docview -    aul_open_file("/opt/share/word.pdf");                                           */
1160 /* image view - aul_open_file("/opt/share/image.jpg");                                          */
1161 /* audio play - aul_open_file("/opt/share/audio.mp3");                                          */
1162 /* video play - aul_open_file("/opt/share/video.mpg");                                          */
1163 /************************************************************************************************/
1164
1165 /** @} */
1166
1167 /**
1168  * @defgroup aul_service High-level APIs to launch applications based on service. 
1169  * @ingroup aul
1170  * @brief
1171  *      AUL High-level APIs based on service 
1172  * 
1173  *      This is Request/Response mechanism based on AUL like DBUS service call with auto-activation.\n
1174  *      We recommend this APIs for requesting application service like camera application service (take_picture)
1175  *      But, You can use other mechanism like DBUS service or your own internal IPC
1176  *
1177  *      - Caller\n
1178  *        Launch application based on service \n
1179  *        If application is not running, AUL requests to reset the event.\n
1180  *        Application can wait result with callback function.
1181  *
1182  *      - Callee\n
1183  *        After callee performs the requested operation, callee sends the result back, if necessary.\n
1184  *
1185  */
1186
1187 /**
1188  * @addtogroup aul_service
1189  * @{
1190  */
1191
1192 /** 
1193  * @brief aul_service_res_fn is service result function
1194  * @param[out]  b       result bundle   
1195  * @param[out]  data    user-supplied data      
1196 */
1197 typedef void (*aul_service_res_fn)(bundle *b, int reserved, void *user_data);
1198
1199 /**
1200  * @par Description:
1201  *      This API launch application based on service.
1202  * @par Purpose:
1203  *      This API is for caller.
1204  *      This API launch application based on service name.
1205  *      This API find default application associated with service name. 
1206  *      and then launch the application with given bundle.
1207  * @par Typical use case:
1208  *      You can launch application provided the service if you know service name.
1209  *      That is, even if you don't know the specific application's pkgname, 
1210  *      you can launch the applicaiton by requesting the service. 
1211  *      For example, If you want to take a picture in your app, you can simply launch camera application. 
1212  *      At that time, you can use this API like aul_open_service(TAKE_PICTURE_SVC,..);
1213  *      
1214  *
1215  * @param[in]   svcname         service name to launch as callee
1216  * @param[in]   b               bundle to be passed to callee
1217  * @param[in]   cbfunc          result callback function
1218  * @param[in]   data            user-supplied data passed to callback function
1219  * @return      callee's pid if success, negative value(<0) if fail
1220  * @retval      AUL_R_OK        - success
1221  * @retval      AUL_R_EINVAL    - invaild service name
1222  * @retval      AUL_R_ENOINIT   - you must initilize aul library with aul_launch_init
1223  * @retval      AUL_R_ECOM      - internal AUL IPC error
1224  * @retval      AUL_R_ERROR     - general error 
1225  *
1226  * @pre
1227  *      None
1228  * @post 
1229  *      None
1230  * @see 
1231  *      None
1232  * @code
1233  * #include <aul.h>
1234  * #include <aul_service.h>
1235  * #include <bundle.h>
1236  *
1237  * void res_func(bundle *b, int reserved, void *user_data)
1238  * {
1239  *      // process result bundle 
1240  * }
1241  *
1242  * int create_camera_view()
1243  * { 
1244  *      aul_open_service(TAKE_PICTURE_SVC, NULL, res_func, NULL);
1245  * }
1246  *
1247  * @endcode
1248  * @remark
1249  *      This API can wait result (asynchronous).
1250  *      To see kinds of default service provided by platform, see "aul_service.h" header file
1251  * 
1252  */
1253 int aul_open_service(const char *svcname, bundle *b, aul_service_res_fn cbfunc, void *data) __attribute__((deprecated));
1254
1255 /**
1256  * @par Description:
1257  *      This API create service result bundle based on bundle received in reset event.
1258  * @par Purpose:
1259  *      This API use to create result bundle to send it to caller.
1260  * @par Typical use case:
1261  *      This API is for callee which provide application service.\n
1262  *      To send result to caller, You must create result bundle. \n
1263  *      Callee(application providing the service) can send result by using this API and aul_send_service_result.
1264  * 
1265  * @param[in]   inb             bundle received in reset event 
1266  * @param[out]  outb            bundle to use for returning result 
1267  * @return      0 if success, negative value(<0) if fail
1268  * @retval      AUL_R_OK        - success
1269  * @retval      AUL_R_EINVAL    - inb is not bundle created by aul_open_service
1270  * @retval      AUL_R_ERROR     - general error 
1271  *
1272  * @pre
1273  *      To create result bundle, You need received original bundle.
1274  *      The original bundle can get from app_reset handler.
1275  * @post 
1276  *      None
1277  * @see 
1278  *      aul_send_service_result
1279  * @code
1280  * #include <aul.h>
1281  * #include <bundle.h>
1282  *
1283  * int app_reset(bundle *b, void *data)
1284  * {
1285  *      ad->recved_bundle = bundle_dup(b);
1286  * }
1287  * 
1288  * int click_ok()
1289  * {
1290  *      bundle* res_bundle;
1291  *      aul_create_result_bundle(ad->recved_bundle,&res_bundle);
1292  *      bundle_add(res_bundle, "result", "1");
1293  *      aul_send_service_result(res_bundle);
1294  * }
1295  * @endcode
1296  * @remark
1297  *      None
1298  * 
1299  */
1300 int aul_create_result_bundle(bundle *inb, bundle **outb);
1301
1302 /**
1303  * @par Description:
1304  *      This API send service result to caller with bundle
1305  * @par Purpose:
1306  *      This API is used to send result bundle to caller.
1307  * @par Typical use case:
1308  *      This API is for callee which provide application service.\n
1309  *      To send result to caller, You can use this API after creating result bundle. \n
1310  *      Callee(application to provide service) can send result by using this API and aul_create_result_bundle.
1311  *
1312  * @param[in]   b      Result data in bundle format
1313  * @return      0 if success, negative value(<0) if fail
1314  * @retval      AUL_R_OK        - success
1315  * @retval      AUL_R_EINVAL    - invalid result bundle
1316  * @retval      AUL_R_ECOMM     - internal AUL IPC error
1317  * @retval      AUL_R_ERROR     - general error 
1318  *
1319  * @pre
1320  *      To send result bundle, You must create result bundle. 
1321  *      see aul_create_result_bundle    
1322  * @post 
1323  *      None
1324  * @see 
1325  *      aul_create_result_bundle
1326  * @code
1327  * #include <aul.h>
1328  * #include <bundle.h>
1329  *
1330  * int app_reset(bundle *b, void *data)
1331  * {
1332  *      ad->recved_bundle = bundle_dup(b);
1333  * }
1334  * 
1335  * int click_ok()
1336  * {
1337  *      bundle* res_bundle;
1338  *      aul_create_result_bundle(ad->recved_bundle,&res_bundle);
1339  *      bundle_add(res_bundle, "result", "1");
1340  *      aul_send_service_result(res_bundle);
1341  * }
1342  * @endcode
1343  * @remark
1344  *      None
1345  * 
1346  */
1347 int aul_send_service_result(bundle *b);
1348
1349 /**
1350  * @par Description:
1351  *      This API set the default application(package name) associated with service name 
1352  * @par Purpose:
1353  *      This API use to change default application associteted with service name
1354  *      In general, Setting Application needs this API. 
1355  * @par Typical use case:
1356  *      Default Application associated with service name can be changed by Setting Application 
1357  *      So, Inhouse service application can be substituted by 3rd party service application 
1358  *
1359  * @param[in]   svcname         service string like "create_contact" 
1360  * @param[in]   defapp          default application like "org.tizen.contact"    
1361  * @return      0 if success, negative value if fail
1362  * @retval      AUL_R_OK        - success
1363  * @retval      AUL_R_EINVAL    - invalid argument(content)
1364  * @retval      AUL_R_ERROR     - general error 
1365  *
1366  * @pre
1367  *      None
1368  * @post 
1369  *      None
1370  * @see 
1371  *      aul_get_defapp_for_service
1372  * @code
1373  * #include <aul.h>
1374  * #include <aul_service.h>
1375  * 
1376  * void set_camera_service_defapp()
1377  * {
1378  *      aul_set_defapp_for_service(TAKE_PICTURE_SVC,"org.tizen.camera");
1379  * }
1380  * 
1381  * @endcode
1382  * @remark
1383  *      None
1384  * 
1385  */
1386 int aul_set_defapp_for_service(const char *svcname, const char *defapp) __attribute__((deprecated));
1387
1388 /**
1389  * @par Description:
1390  *      This API get the application package name associated with given service name
1391  * @par Purpose:
1392  *      This API use to get default application associteted with service name
1393  *      In general, Setting Application need this API. 
1394  * @par Typical use case:
1395  *      Setting Application show mapping of default application/ service 
1396  * 
1397  * @param[in]   svcname         service string like "create_contact" 
1398  * @param[out]  defapp          default application     
1399  * @param[in]   len             length of defapp
1400  * @return      0 if success, negative value if fail
1401  * @retval      AUL_R_OK        - success
1402  * @retval      AUL_R_EINVAL    - invalid argument(content)
1403  * @retval      AUL_R_ERROR     - general error 
1404  *
1405  * @pre
1406  *      None
1407  * @post 
1408  *      None
1409  * @see 
1410  *      aul_set_defapp_for_service
1411  * @code
1412  * #include <aul.h>
1413  * #include <aul_service.h>
1414  * 
1415  * void get_camera_service_defapp()
1416  * {
1417  *      char appname[255];
1418  *      aul_get_defapp_for_service(TAKE_PICTURE_SVC,appname,sizeof(appname));
1419  * }
1420  * 
1421  * @endcode
1422  * @remark
1423  *      None
1424  * 
1425  */
1426 int aul_get_defapp_for_service(const char *svcname, char *defapp, int len) __attribute__((deprecated));
1427
1428
1429 /** @} */
1430
1431
1432
1433 #ifdef __cplusplus
1434         }
1435 #endif
1436
1437
1438 #endif          /* __AUL_H__ */
1439
1440 /* vi: set ts=8 sts=8 sw=8: */