From: Jihoon Kim Date: Fri, 27 Mar 2020 05:44:01 +0000 (+0900) Subject: Create configuration header X-Git-Tag: submit/tizen_5.5/20200330.104023~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e3ae2adc6b24c98cd684049dfcb4a5ab16955bd2;p=platform%2Fcore%2Fuifw%2Fcapi-ui-sticker.git Create configuration header Change-Id: I8e909a05e42cfcc76b025f07baec87c879362f7c Signed-off-by: Jihoon Kim --- diff --git a/receiver/inc/config.h b/receiver/inc/config.h new file mode 100644 index 0000000..88eee4d --- /dev/null +++ b/receiver/inc/config.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved. + * + * 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 __CONFIG_H__ +#define __CONFIG_H__ + +#define ACCESSORY_SERVICE_PROFILE_ID "/sample/filetransfersender" +#define ACCESSORY_SERVICE_CHANNEL_ID 107 + +#define SYNC_ALARM_DELAY 0 +#define SYNC_ALARM_INTERVAL 12*60*60 + +#define REMOTE_APP_ID "com.samsung.w-input-selector" +#define MESSAGE_PORT_REMOTE_NAME REMOTE_APP_ID"_msg_port_rcv" + +#define MINIMUM_BATTERY 15 + +#endif /* __CONFIG_H__ */ diff --git a/receiver/inc/ft.h b/receiver/inc/ft.h index 10ccb0e..0a022a6 100644 --- a/receiver/inc/ft.h +++ b/receiver/inc/ft.h @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #include #ifndef __FT_H__ diff --git a/receiver/inc/log.h b/receiver/inc/log.h index 07ee738..763f6cb 100644 --- a/receiver/inc/log.h +++ b/receiver/inc/log.h @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #ifndef __debug_H__ #define __debug_H__ diff --git a/receiver/inc/main.h b/receiver/inc/main.h index e32a820..27883e4 100644 --- a/receiver/inc/main.h +++ b/receiver/inc/main.h @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #include #include #include diff --git a/receiver/inc/message.h b/receiver/inc/message.h index 392f1cd..791a9aa 100644 --- a/receiver/inc/message.h +++ b/receiver/inc/message.h @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #include #include diff --git a/receiver/inc/sticker_info.h b/receiver/inc/sticker_info.h index 8231585..2e20ad8 100644 --- a/receiver/inc/sticker_info.h +++ b/receiver/inc/sticker_info.h @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #ifndef __STICKER_INFO_H__ #define __STICKER_INFO_H__ diff --git a/receiver/inc/sticker_request.h b/receiver/inc/sticker_request.h index 9c8089f..583bd9a 100644 --- a/receiver/inc/sticker_request.h +++ b/receiver/inc/sticker_request.h @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #ifndef __STICKER_REQUEST_H__ #define __STICKER_REQUEST_H__ diff --git a/receiver/inc/sync_alarm.h b/receiver/inc/sync_alarm.h index e46515c..8f025ca 100644 --- a/receiver/inc/sync_alarm.h +++ b/receiver/inc/sync_alarm.h @@ -13,14 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #include #ifndef __ALARM_H__ #define __ALARM_H__ #define APP_CONTROL_OPERATION_SYNC_ALARM "http://tizen.org/appcontrol/operation/sticker_sync_alarm" -#define SYNC_ALARM_DELAY 0 -#define SYNC_ALARM_INTERVAL 12*60*60 bool sync_alarm_register(const char *operation, int delay, int period); bool sync_alarm_exist(); diff --git a/receiver/src/ft.cpp b/receiver/src/ft.cpp index a6cba2f..1408aa7 100644 --- a/receiver/src/ft.cpp +++ b/receiver/src/ft.cpp @@ -40,9 +40,7 @@ #include "sticker_request.h" #include "message.h" #include "sync_alarm.h" - -#define ACCESSORY_SERVICE_PROFILE_ID "/sample/filetransfersender" -#define ACCESSORY_SERVICE_CHANNEL_ID 107 +#include "config.h" #define STICKER_SYNC_FEATURE_REQ "sticker-sync-feature-req" #define STICKER_SYNC_FEATURE_RSP "sticker-sync-feature-rsp" diff --git a/receiver/src/main.cpp b/receiver/src/main.cpp index 3fd98e1..969f575 100644 --- a/receiver/src/main.cpp +++ b/receiver/src/main.cpp @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #include #include #include @@ -22,10 +23,9 @@ #include "main.h" #include "ft.h" #include "log.h" +#include "config.h" #include "sync_alarm.h" -#define MINIMUM_BATTERY 15 - static bool app_create(void *data) { /* Hook to take necessary actions before main event loop starts diff --git a/receiver/src/message.cpp b/receiver/src/message.cpp index 8dde6a6..0ca7d32 100644 --- a/receiver/src/message.cpp +++ b/receiver/src/message.cpp @@ -18,9 +18,7 @@ #include "message.h" #include "log.h" - -#define REMOTE_APP_ID "com.samsung.w-input-selector" -#define MESSAGE_PORT_REMOTE_NAME REMOTE_APP_ID"_msg_port_rcv" +#include "config.h" static int port_id = -1; diff --git a/receiver/src/sticker_info.cpp b/receiver/src/sticker_info.cpp index 57ace21..16ca72e 100644 --- a/receiver/src/sticker_info.cpp +++ b/receiver/src/sticker_info.cpp @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #include "sticker_info.h" #include #include diff --git a/receiver/src/sync_alarm.cpp b/receiver/src/sync_alarm.cpp index d4879d8..ec7079e 100644 --- a/receiver/src/sync_alarm.cpp +++ b/receiver/src/sync_alarm.cpp @@ -19,6 +19,7 @@ #include #include "log.h" +#include "config.h" static int recurring_alarm_id = -1;