1. add smack manifest
[platform/core/appfw/app-svc.git] / include / appsvc.h
1 /*
2  *  app-svc
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
24 #ifndef __APP_SVC_H__
25 #define __APP_SVC_H__
26
27 /**
28  * @file    appsvc.h
29  * @version 1.1
30  * @brief   This file contains APIs of the appsvc library
31  */
32
33 /**
34  * @addtogroup APPLICATION_FRAMEWORK
35  * @{
36  *
37  * @defgroup appsvc Application Service
38  * @version  1.1
39  * @brief    Application Service library
40  *
41  */
42
43 /**
44  * @addtogroup appsvc
45  * @{
46  */
47
48
49 #include <bundle.h>
50
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54
55
56 /** APP_SVC OPERATION TYPE*/
57 #define APPSVC_OPERATION_DEFAULT                "http://tizen.org/appcontrol/operation/default"
58 /** APP_SVC OPERATION TYPE*/
59 #define APPSVC_OPERATION_EDIT                   "http://tizen.org/appcontrol/operation/edit"
60 /** APP_SVC OPERATION TYPE*/
61 #define APPSVC_OPERATION_VIEW                   "http://tizen.org/appcontrol/operation/view"
62 /** APP_SVC OPERATION TYPE*/
63 #define APPSVC_OPERATION_PICK                   "http://tizen.org/appcontrol/operation/pick"
64 /** APP_SVC OPERATION TYPE*/
65 #define APPSVC_OPERATION_CREATE_CONTENT         "http://tizen.org/appcontrol/operation/create_content"
66 /** APP_SVC OPERATION TYPE*/
67 #define APPSVC_OPERATION_CALL                   "http://tizen.org/appcontrol/operation/call"
68 /** APP_SVC OPERATION TYPE*/
69 #define APPSVC_OPERATION_SEND                   "http://tizen.org/appcontrol/operation/send"
70 /** APP_SVC OPERATION TYPE*/
71 #define APPSVC_OPERATION_SEND_TEXT              "http://tizen.org/appcontrol/operation/send_text"
72 /** APP_SVC OPERATION TYPE*/
73 #define APPSVC_OPERATION_DIAL                   "http://tizen.org/appcontrol/operation/dial"
74 /** APP_SVC OPERATION TYPE*/
75 #define APPSVC_OPERATION_SEARCH                 "http://tizen.org/appcontrol/operation/search"
76 /** APP_SVC OPERATION TYPE*/
77 #define APPSVC_OPERATION_DOWNLOAD               "http://tizen.org/appcontrol/operation/download"
78
79
80 /** APP_SVC DATA SUBJECT*/
81 #define APPSVC_DATA_SUBJECT             "http://tizen.org/appcontrol/data/subject"
82 /** APP_SVC DATA TYPE*/
83 #define APPSVC_DATA_TO                  "http://tizen.org/appcontrol/data/to"
84 /** APP_SVC DATA TYPE*/
85 #define APPSVC_DATA_CC                  "http://tizen.org/appcontrol/data/cc"
86 /** APP_SVC DATA TYPE*/
87 #define APPSVC_DATA_BCC                 "http://tizen.org/appcontrol/data/bcc"
88 /** APP_SVC DATA TYPE*/
89 #define APPSVC_DATA_TEXT                "http://tizen.org/appcontrol/data/text"
90 /** APP_SVC DATA TYPE*/
91 #define APPSVC_DATA_TITLE               "http://tizen.org/appcontrol/data/title"
92 /** APP_SVC DATA TYPE*/
93 #define APPSVC_DATA_SELECTED            "http://tizen.org/appcontrol/data/selected"
94 /** APP_SVC DATA TYPE*/
95 #define APPSVC_DATA_KEYWORD             "http://tizen.org/appcontrol/data/keyword"
96
97 /** APP SVC internal private key */
98 #define APP_SVC_K_URI_R_INFO            "__APP_SVC_URI_R_INFO__"
99
100 /** APP SVC internal private value */
101 #define APP_SVC_V_SCHEME_AND_HOST               "__SCHEME_AND_HOST__"
102 /** APP SVC internal private value */
103 #define APP_SVC_V_SCHEME                "__SCHEME__"
104
105
106 /**
107  * @brief Return values in appsvc. 
108  */
109 typedef enum _appsvc_return_val {
110         APPSVC_RET_ELAUNCH = -4,                /**< Failure on launching the app */
111         APPSVC_RET_ENOMATCH = -3,               /**< No matching result Error */
112         APPSVC_RET_EINVAL = -2,                 /**< Invalid argument */
113         APPSVC_RET_ERROR = -1,                  /**< General error */
114         APPSVC_RET_OK = 0                       /**< General success */
115 }appsvc_return_val;
116
117
118 /**
119  * @brief result values in appsvc. 
120  */
121 typedef enum _appsvc_result_val {
122         APPSVC_RES_CANCEL = -2,         /**< Cancel by system */
123         APPSVC_RES_NOT_OK = -1,         /**< Fail by user */
124         APPSVC_RES_OK = 0               /**< Success by user */
125 }appsvc_result_val;
126
127
128 /** 
129  * @brief appsvc_res_fn is appsvc result function
130  * @param[out]  b               result bundle   
131  * @param[out]  request_code    request code
132  * @param[out]  result                  result value
133  * @param[out]  data            user-supplied data      
134 */
135 typedef void (*appsvc_res_fn)(bundle *b, int request_code, appsvc_result_val result, void *data);
136
137
138 /** 
139  * @brief iterator function running with appsvc_get_list 
140  * @param[out]  pkg_name        package name retreived by appsvc_get_list
141  * @param[out]  data            user-supplied data      
142 */
143 typedef int (*appsvc_info_iter_fn)(const char *appid, void *data);
144
145 typedef int (*appsvc_host_res_fn)(void *data);
146
147 /**
148  * @par Description:
149  * This function sets an operation to launch application based on appsvc.
150  *
151  * @param[in] b bundle object 
152  * @param[in] operation operation 
153  *
154  * @return 0 if success, negative value(<0) if fail
155  * @retval APPSVC_RET_OK - success
156  * @retval APPSVC_RET_ERROR - general error 
157  * @retval APPSVC_RET_EINVAL - invalid argument(content)
158  *
159  * @pre None.
160  * @post None.
161  * @see None.
162  * @remarks An application must call this function before using appsvc_run_service API. 
163  *
164  * @par Sample code:
165  * @code
166 #include <appsvc.h>
167
168 ...
169 {
170         bundle *b = NULL;
171
172         b = bundle_create();
173         
174         appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
175 }
176  * @endcode
177  *
178  */
179 int appsvc_set_operation(bundle *b, const char *operation);
180
181 /**
182  * @par Description:
183  * This function sets an uri to launch application based on appsvc.
184  *
185  * @param[in] b bundle object 
186  * @param[in] uri uri 
187  *
188  * @return 0 if success, negative value(<0) if fail
189  * @retval APPSVC_RET_OK - success
190  * @retval APPSVC_RET_ERROR - general error 
191  * @retval APPSVC_RET_EINVAL - invalid argument(content)
192  *
193  * @pre None.
194  * @post None.
195  * @see None.
196  * @remarks None. 
197  *
198  * @par Sample code:
199  * @code
200 #include <appsvc.h>
201
202 ...
203 {
204         bundle *b = NULL;
205
206         b = bundle_create();
207         
208         appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
209         appsvc_set_uri(b,"http://www.samsung.com");
210 }
211  * @endcode
212  *
213  */
214 int appsvc_set_uri(bundle *b, const char *uri);
215
216 /**
217  * @par Description:
218  * This function sets a mime-type to launch application based on appsvc.
219  *
220  * @param[in] b bundle object 
221  * @param[in] mime mime-type 
222  *
223  * @return 0 if success, negative value(<0) if fail
224  * @retval APPSVC_RET_OK - success
225  * @retval APPSVC_RET_ERROR - general error 
226  * @retval APPSVC_RET_EINVAL - invalid argument(content)
227  *
228  * @pre None.
229  * @post None.
230  * @see None.
231  * @remarks None. 
232  *
233  * @par Sample code:
234  * @code
235 #include <appsvc.h>
236
237 ...
238 {
239         bundle *b = NULL;
240
241         b = bundle_create();
242         
243         appsvc_set_operation(b, APPSVC_OPERATION_PICK);
244         appsvc_set_mime(b,"image/jpg");
245 }
246  * @endcode
247  *
248  */
249 int appsvc_set_mime(bundle *b, const char *mime);
250
251 /**
252  * @par Description:
253  * This function sets an extra data to launch application based on appsvc.
254  *
255  * @param[in] b bundle object 
256  * @param[in] key key of extra data 
257  * @param[in] val data 
258  *
259  * @return 0 if success, negative value(<0) if fail
260  *
261  * @pre None.
262  * @post None.
263  * @see None.
264  * @remarks None. 
265  *
266  * @par Sample code:
267  * @code
268 #include <appsvc.h>
269
270 ...
271 {
272         bundle *b = NULL;
273
274         b = bundle_create();
275         
276         appsvc_set_operation(b, APPSVC_OPERATION_SEND);
277         appsvc_set_uri(b,"mailto:xxx1@xxx");
278         appsvc_add_data(b,APPSVC_DATA_CC,"xxx2@xxx");
279 }
280  * @endcode
281  *
282  */
283 int appsvc_add_data(bundle *b, const char *key, const char *val);
284
285 /**
286  * @par Description:
287  * This function sets an extra array data to launch application based on appsvc.
288  *
289  * @param[in] b bundle object 
290  * @param[in] key key of extra data 
291  * @param[in] val_array data 
292  * @param[in] len Length of array
293  *
294  * @return 0 if success, negative value(<0) if fail
295  *
296  * @pre None.
297  * @post None.
298  * @see None.
299  * @remarks None. 
300  *
301  * @par Sample code:
302  * @code
303 #include <appsvc.h>
304
305 ...
306 {
307         bundle *b = NULL;
308         char *images[] = {"/opt/media/a.jpg", "/opt/media/b.jpg", "/opt/media/c.jpg"};
309
310         b = bundle_create();
311
312         appsvc_add_data_array(b, APPSVC_DATA_SELECTED, images, 3);
313 }
314  * @endcode
315  *
316  */
317 int appsvc_add_data_array(bundle *b, const char *key, const char **val_array, int len);
318
319
320 /**
321  * @par Description:
322  * This function sets a package name to launch application based on appsvc.
323  *
324  * @param[in] b bundle object 
325  * @param[in] pkg_name package name for explict launch
326  *
327  * @return 0 if success, negative value(<0) if fail
328  * @retval APPSVC_RET_OK - success
329  * @retval APPSVC_RET_ERROR - general error 
330  * @retval APPSVC_RET_EINVAL - invalid argument(content)
331  *
332  * @pre None.
333  * @post None.
334  * @see None.
335  * @remarks None. 
336  *
337  * @par Sample code:
338  * @code
339 #include <appsvc.h>
340
341 ...
342 {
343         bundle *b = NULL;
344
345         b = bundle_create();
346         
347         appsvc_set_operation(b, APPSVC_OPERATION_PICK);
348         appsvc_set_mime(b,"image/jpg");
349         appsvc_set_pkgname(b, "org.tizen.mygallery");
350 }
351  * @endcode
352  *
353  */
354 /* Deprecated API */
355 int appsvc_set_pkgname(bundle *b, const char *pkg_name); // __attribute__((deprecated));
356
357
358 /**
359  * @par Description:
360  * This function sets a appid to launch application based on appsvc.
361  *
362  * @param[in] b bundle object
363  * @param[in] appid application id for explict launch
364  *
365  * @return 0 if success, negative value(<0) if fail
366  * @retval APPSVC_RET_OK - success
367  * @retval APPSVC_RET_ERROR - general error
368  * @retval APPSVC_RET_EINVAL - invalid argument(content)
369  *
370  * @pre None.
371  * @post None.
372  * @see None.
373  * @remarks None.
374  *
375  * @par Sample code:
376  * @code
377 #include <appsvc.h>
378
379 ...
380 {
381         bundle *b = NULL;
382
383         b = bundle_create();
384
385         appsvc_set_operation(b, APPSVC_OPERATION_PICK);
386         appsvc_set_mime(b,"image/jpg");
387         appsvc_set_appid(b, "org.tizen.mygallery");
388 }
389  * @endcode
390  *
391  */
392 int appsvc_set_appid(bundle *b, const char *appid);
393
394
395 /**
396  * @par Description:
397  * This API launch application based on appsvc.
398  *
399  * @param[in] b bundle to be passed to callee
400  * @param[in] request_code request code
401  * @param[in] cbfunc result callback function
402  * @param[in] data user-supplied data passed to callback function
403  *
404  * @return callee's pid if success, negative value(<0) if fail
405  * @retval callee's pid - success
406  * @retval APPSVC_RET_ERROR - general error 
407  * @retval APPSVC_RET_EINVAL - invalid argument(content)
408  * @retval APPSVC_RET_ENOMATCH - no matching result Error 
409  * @retval APPSVC_RET_ELAUNCH - failure on launching the app
410  *
411  * @pre None.
412  * @post None.
413  * @see None.
414  * @remarks None. 
415  *
416  * @par Sample code:
417  * @code
418 #include <appsvc.h>
419
420 ...
421 {
422         bundle *b = NULL;
423         static int num = 0;
424
425         b = bundle_create();
426         
427         appsvc_set_operation(b, APPSVC_OPERATION_PICK);
428         appsvc_set_mime(b,"image/jpg");
429
430         return appsvc_run_service(b, 0, cb_func, (void*)NULL);
431 }
432  * @endcode
433  *
434  */
435 int appsvc_run_service(bundle *b, int request_code, appsvc_res_fn cbfunc, void *data);
436
437 /**
438  * @par Description:
439  * This API use to get application list that is matched with given bundle.
440  *
441  * @param[in] b bundle to resolve application
442  * @param[in] iter_fn iterator function
443  * @param[in] data user-supplied data for iter_fn
444  *
445  * @return 0 if success, negative value(<0) if fail
446  * @retval APPSVC_RET_OK - success
447  * @retval APPSVC_RET_EINVAL - invalid argument(content)
448  * @retval APPSVC_RET_ENOMATCH - no matching result Error 
449  *
450  * @pre None.
451  * @post None.
452  * @see None.
453  * @remarks None. 
454  *
455  * @par Sample code:
456  * @code
457 #include <appsvc.h>
458
459 static int iter_fn(const char* pkg_name, void *data)
460 {
461         printf("\t==========================\n");
462         printf("\t pkg_name: %s\n", pkg_name);
463         printf("\t==========================\n");
464         return 0;
465 }
466
467 ...
468 {
469         bundle *b = NULL;
470         static int num = 0;
471
472         b = bundle_create();
473         
474         appsvc_set_operation(b, APPSVC_OPERATION_PICK);
475         appsvc_set_mime(b,"image/jpg");
476
477         return appsvc_get_list(b, iter_fn, (void*)NULL);
478 }
479  * @endcode
480  *
481  */
482 int appsvc_get_list(bundle *b, appsvc_info_iter_fn iter_fn, void *data);
483
484 /**
485  * @par Description:
486  * This function gets a operation from bundle.
487  *
488  * @param[in] b bundle object 
489  *
490  * @return Pointer for operation string if success, NULL if fail
491  *
492  * @pre None.
493  * @post None.
494  * @see None.
495  * @remarks None. 
496  *
497  * @par Sample code:
498  * @code
499 #include <appsvc.h>
500
501 ...
502 {
503         char *val;      
504         val = appsvc_get_operation(b);
505 }
506  * @endcode
507  *
508  */
509 const char *appsvc_get_operation(bundle *b);
510
511 /**
512  * @par Description:
513  * This function gets a uri from bundle.
514  *
515  * @param[in] b bundle object 
516  *
517  * @return Pointer for uri string if success, NULL if fail
518  *
519  * @pre None.
520  * @post None.
521  * @see None.
522  * @remarks None. 
523  *
524  * @par Sample code:
525  * @code
526 #include <appsvc.h>
527
528 ...
529 {
530         char *val;      
531         val = appsvc_get_uri(b);
532 }
533  * @endcode
534  *
535  */
536 const char *appsvc_get_uri(bundle *b);
537
538 /**
539  * @par Description:
540  * This function gets a mime-type from bundle.
541  *
542  * @param[in] b bundle object 
543  *
544  * @return Pointer for mime-type string if success, NULL if fail
545  *
546  * @pre None.
547  * @post None.
548  * @see None.
549  * @remarks None. 
550  *
551  * @par Sample code:
552  * @code
553 #include <appsvc.h>
554
555 ...
556 {
557         char *val;      
558         val = appsvc_get_mime(b);
559 }
560  * @endcode
561  *
562  */
563 const char *appsvc_get_mime(bundle *b);
564
565 /**
566  * @par Description:
567  * This function gets a package name from bundle.
568  *
569  * @param[in] b bundle object 
570  *
571  * @return Pointer for package name string if success, NULL if fail
572  *
573  * @pre None.
574  * @post None.
575  * @see None.
576  * @remarks None. 
577  *
578  * @par Sample code:
579  * @code
580 #include <appsvc.h>
581
582 ...
583 {
584         char *val;      
585         val = appsvc_get_pkgname(b);
586 }
587  * @endcode
588  *
589  */
590 /* Deprecated API */
591 const char *appsvc_get_pkgname(bundle *b); // __attribute__((deprecated));
592
593 /**
594  * @par Description:
595  * This function gets a application id from bundle.
596  *
597  * @param[in] b bundle object
598  *
599  * @return Pointer for application id string if success, NULL if fail
600  *
601  * @pre None.
602  * @post None.
603  * @see None.
604  * @remarks None.
605  *
606  * @par Sample code:
607  * @code
608 #include <appsvc.h>
609
610 ...
611 {
612         char *val;
613         val = appsvc_get_appid(b);
614 }
615  * @endcode
616  *
617  */
618 const char *appsvc_get_appid(bundle *b);
619
620 /**
621  * @par Description:
622  * This function gets value from key.
623  *
624  * @param[in] b bundle object 
625  * @param[in] key key
626  *
627  * @return Pointer for value string if success, NULL if fail
628  *
629  * @pre None.
630  * @post None.
631  * @see None.
632  * @remarks None. 
633  *
634  * @par Sample code:
635  * @code
636 #include <appsvc.h>
637
638 ...
639 {
640         char *val;      
641         val = appsvc_get_data(b, APPSVC_DATA_CC);
642 }
643  * @endcode
644  *
645  */
646 const char *appsvc_get_data(bundle *b, const char *key);
647
648 /**
649  * @par Description:
650  * This function gets value from key.
651  *
652  * @param[in] b bundle object 
653  * @param[in] key key
654  * @param[out] len length of array
655  *
656  * @return Pointer for value string array if success, NULL if fail
657  *
658  * @pre None.
659  * @post None.
660  * @see None.
661  * @remarks None. 
662  *
663  * @par Sample code:
664  * @code
665 #include <appsvc.h>
666
667 ...
668 {
669         char **val_array;       
670         int len;
671         char *val;
672
673         if(appsvc_data_is_array(b, APPSVC_DATA_SELECTED))
674                 val_array = appsvc_get_data_array(b, APPSVC_DATA_SELECTED, &len);
675         else 
676                 val = appsvc_get_data(b, APPSVC_DATA_SELECTED);
677 }
678  * @endcode
679  *
680  */
681 const char **appsvc_get_data_array(bundle *b, const char *key, int *len);
682
683 /**
684  * @par Description:
685  * This API create appsvc result bundle based on bundle received in reset event.
686  *
687  * @param[in] inb bundle received in reset event 
688  * @param[in] outb bundle to use for returning result 
689  *
690  * @retval APPSVC_RET_OK - success
691  * @retval APPSVC_RET_ERROR - general error 
692  * @retval APPSVC_RET_EINVAL - invalid argument(content)
693  *
694  * @pre None.
695  * @post None.
696  * @see appsvc_send_result.
697  * @remarks None. 
698  *
699  * @par Sample code:
700  * @code
701 #include <appsvc.h>
702
703 ...
704 {
705         struct appdata *ad = data;
706         bundle* res_bundle;
707         
708         appsvc_create_result_bundle(ad->b,&res_bundle);
709         bundle_add(res_bundle, "result", "1");
710         appsvc_send_result(res_bundle, 0);
711 }
712  * @endcode
713  *
714  */
715 int appsvc_create_result_bundle(bundle *inb, bundle **outb);
716
717 /**
718  * @par Description:
719  * This API send appsvc result to caller with bundle.
720  *
721  * @param[in] b Result data in bundle format
722  * @param[in] result result value
723  *
724  * @retval APPSVC_RET_OK - success
725  * @retval APPSVC_RET_ERROR - general error 
726  * @retval APPSVC_RET_EINVAL - invalid argument(content)
727  *
728  * @pre appsvc_create_result_bundle.
729  * @post None.
730  * @see appsvc_send_result.
731  * @remarks None. 
732  *
733  * @par Sample code:
734  * @code
735 #include <appsvc.h>
736
737 ...
738 {
739         struct appdata *ad = data;
740         bundle* res_bundle;
741         
742         appsvc_create_result_bundle(ad->b,&res_bundle);
743         bundle_add(res_bundle, "result", "1");
744         appsvc_send_result(res_bundle, 0);
745 }
746  * @endcode
747  *
748  */
749 int appsvc_send_result(bundle *b, appsvc_result_val result);
750
751 /**
752  * @par Description:
753  * This API set the default application(package name) associated with op, uri and mime-type.
754  *
755  * @param[in] op                operation
756  * @param[in] mime_type mime-type
757  * @param[in] scheme    scheme of uri
758  * @param[in] defapp    default application
759  *
760  * @retval APPSVC_RET_OK - success
761  * @retval APPSVC_RET_ERROR - general error 
762  * @retval APPSVC_RET_EINVAL - invalid argument(content)
763  *
764  * @pre None.
765  * @post None.
766  * @see None.
767  * @remarks None. 
768  *
769  * @par Sample code:
770  * @code
771 #include <appsvc.h>
772
773 ...
774 {
775         appsvc_set_defapp(APPSVC_OPERATION_VIEW, NULL,"http", "org.tizen.mybrowser");
776 }
777  * @endcode
778  *
779  */
780 int appsvc_set_defapp(const char *op, const char *mime_type, const char *uri,
781                                 const char *defapp);
782
783 /**
784  * @par Description:
785  * This API unset the default application(package name) associated with op, uri and mime-type.
786  *
787  * @param[in] defapp    default application
788  *
789  * @retval APPSVC_RET_OK - success
790  * @retval APPSVC_RET_ERROR - general error 
791  *
792  * @pre None.
793  * @post None.
794  * @see None.
795  * @remarks None. 
796  *
797  * @par Sample code:
798  * @code
799 #include <appsvc.h>
800
801 ...
802 {
803         appsvc_unset_defapp("org.tizen.test");
804 }
805  * @endcode
806  *
807  */
808 int appsvc_unset_defapp(const char *defapp);
809
810 /**
811  * @par Description:
812  *      This API ask a application is default application or not.
813  *
814  * @param[in]   pkg_name        application package name
815  * @return      true / false
816  * @retval      1       app_name is default application in appsvc.
817  * @retval      0       app_name is NOT default application in appsvc.
818  *
819   * @pre None.
820   * @post None.
821   * @see None.
822   * @remarks None. 
823   *
824   * @par Sample code:
825   * @code
826 #include <appsvc.h>
827  
828  ...
829
830  * int is_defapp_browser_app()
831  * { 
832  *      return appsvc_is_defapp("org.tizen.browser");
833  * }
834  *
835  * @endcode
836  * @remark
837  *      None
838
839 */
840 int appsvc_is_defapp(const char *appid);
841
842
843 /**
844  * @par Description:
845  *      This API ask a extra data is array or not.
846  *
847  * @param[in] b bundle object 
848  * @param[in] key key of extra data 
849  * @return      true / false
850  * @retval      1       a extra data is array.
851  * @retval      0       a extra data is not array.
852  *
853   * @pre None.
854   * @post None.
855   * @see None.
856   * @remarks None. 
857   *
858   * @par Sample code:
859   * @code
860 #include <appsvc.h>
861  
862  ...
863
864  * int is_defapp_browser_app(bundle *b, char *key)
865  * { 
866  *      return appsvc_data_is_array(b, key);
867  * }
868  *
869  * @endcode
870  * @remark
871  *      None
872
873 */
874 int appsvc_data_is_array(bundle *b, const char *key);
875
876
877 #ifdef __cplusplus
878         }
879 #endif
880
881 /**
882  * @}
883  */
884 /**
885  * @}
886  */
887
888
889 #endif          /* __APP_SVC_H__ */
890
891 /* vi: set ts=8 sts=8 sw=8: */