X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fkey.c;h=77961b2312998af169c2a4ba58a7348938e22e5a;hb=4b3aeef57b4ddc4e481170a0b700b8a51a3beda4;hp=809757bee117c0a38a4f712194dc99914f14ddaa;hpb=e3d5bb584aa5549e9b245ade34757e3419ae61a7;p=framework%2Fappfw%2Faul-1.git diff --git a/src/key.c b/src/key.c index 809757b..77961b2 100755 --- a/src/key.c +++ b/src/key.c @@ -19,11 +19,10 @@ * */ - +#define _GNU_SOURCE #include #include #include -#include #include #include #include @@ -60,6 +59,7 @@ int aul_register_key_init_callback( SLPAPI int aul_key_init(int (*aul_handler) (bundle *, void *), void *data) { +#ifdef _APPFW_FEATURE_AMD_KEY int fd; GPollFD *gpollfd; GSource *src; @@ -76,9 +76,7 @@ SLPAPI int aul_key_init(int (*aul_handler) (bundle *, void *), void *data) gpollfd = (GPollFD *) g_malloc(sizeof(GPollFD)); if (gpollfd == NULL) { - _E("out of memory"); g_source_unref(src); - close(fd); return AUL_R_ERROR; } @@ -95,12 +93,13 @@ SLPAPI int aul_key_init(int (*aul_handler) (bundle *, void *), void *data) return AUL_R_ERROR; g_source_unref(src); - +#endif return AUL_R_OK; } SLPAPI int aul_key_reserve() { +#ifdef _APPFW_FEATURE_AMD_KE bundle *kb; int ret; @@ -109,10 +108,14 @@ SLPAPI int aul_key_reserve() bundle_free(kb); return ret; +#else + return AUL_R_OK; +#endif } SLPAPI int aul_key_release() { +#ifdef _APPFW_FEATURE_AMD_KE bundle *kb; int ret; @@ -121,7 +124,7 @@ SLPAPI int aul_key_release() bundle_free(kb); return ret; +#else + return AUL_R_OK; +#endif } - - -