4 * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Youngjoo Park <yjoo93.park@samsung.com>,
7 * Seungtaek Chung <seungtaek.chung@samsung.com>, Youngsub Ko <ys4610.ko@samsung.com>
9 * Licensed under the Apache License, Version 2.0 (the License);
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an AS IS BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
23 #ifndef __BADGE_INTERNAL_DEF_H__
24 #define __BADGE_INTERNAL_DEF_H__
29 #include "badge_error.h"
33 #define EXPORT_API __attribute__ ((visibility("default")))
36 typedef struct _badge_h badge_h;
38 char *_badge_get_pkgname_by_pid(void);
40 badge_error_e _badge_is_existing(const char *pkgname, bool *existing);
42 badge_error_e _badge_foreach_existed(badge_cb callback, void *data);
44 badge_error_e _badge_insert(badge_h *badge);
46 badge_error_e _badge_remove(const char *caller, const char *pkgname);
48 badge_error_e _badget_set_count(const char *caller, const char *pkgname,
51 badge_error_e _badget_get_count(const char *pkgname, unsigned int *count);
53 badge_error_e _badget_set_display(const char *pkgname,
54 unsigned int is_display);
56 badge_error_e _badget_get_display(const char *pkgname, unsigned int *is_display);
58 badge_error_e _badge_register_changed_cb(badge_change_cb callback, void *data);
60 badge_error_e _badge_unregister_changed_cb(badge_change_cb callback);
62 badge_error_e _badge_free(badge_h *badge);
64 badge_h *_badge_new(const char *pkgname, const char *writable_pkgs,
67 char *_badge_pkgs_new(badge_error_e *err, const char *pkg1, ...);
69 char *_badge_pkgs_new_valist(badge_error_e *err,
70 const char *pkg1, va_list args);
72 void badge_changed_cb_call(unsigned int action, const char *pkgname,
75 #endif /* __BADGE_INTERNAL_DEF_H__ */