-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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 __MSG_BUNDLE_H__
-#define __MSG_BUNDLE_H__
-
-
- /* Bundle key name */
-#define MSG_BUNDLE_KEY_TYPE "type"
-#define MSG_BUNDLE_KEY_RUN_TYPE "RUN_TYPE" /* type for email */
-#define MSG_BUNDLE_KEY_LAUNCH_TYPE "launch-type" /* type for call */
-
-#define MSG_BUNDLE_KEY_MSG_ID "msgId"
-#define MSG_BUNDLE_KEY_THREAD_ID "threadId"
-#define MSG_BUNDLE_KEY_THREAD_NAME "threadName"
-#define MSG_BUNDLE_KEY_THREAD_ADDRESS "threadAddr"
-#define MSG_BUNDLE_KEY_CONTACT_ID "contactId"
-
-#define MSG_BUNDLE_KEY_COMPOSER "composer"
-#define MSG_BUNDLE_KEY_TO "TO"
-#define MSG_BUNDLE_KEY_CC "CC"
-#define MSG_BUNDLE_KEY_BCC "BCC"
-#define MSG_BUNDLE_KEY_ATTACHFILE "ATTACHFILE"
-#define MSG_BUNDLE_KEY_SUBJECT "SUBJECT"
-#define MSG_BUNDLE_KEY_BODY "BODY"
-#define MSG_BUNDLE_KEY_RESEND "RESEND"
-#define MSG_BUNDLE_KEY_DELETE_MSG "delete_msg"
-#define MSG_BUNDLE_KEY_RECIPIENT "recipient"
-#define MSG_BUNDLE_KEY_NUMBER_INDEX "number/index"
-#define MSG_BUNDLE_KEY_INDEX "index"
-#define MSG_BUNDLE_KEY_REFRESH_CONV "refresh_conv"
-#define MSG_BUNDLE_KEY_MESSAGE_BOX "messagebox"
-#define MSG_BUNDLE_KEY_INDICATOR_MODE "indicator_mode"
-
-#define MSG_BUNDLE_KEY_REQUEST_TYPE "request_type"
-#define MSG_BUNDLE_KEY_FILE_TYPE "file_type"
-#define MSG_BUNDLE_KEY_SELECT_TYPE "select_type"
-#define MSG_BUNDLE_KEY_PREVIEW_DATA "preview_data"
-
-#define MSG_BUNDLE_KEY_GET_SEL_LIST "get_select_list"
-#define MSG_BUNDLE_KEY_NAMECARD_INDEX "id"
-#define MSG_BUNDLE_KEY_COUNT "count"
-#define MSG_BUNDLE_KEY_IMAGE "image"
-#define MSG_BUNDLE_KEY_TEXT "text"
-#define MSG_BUNDLE_KEY_PATH "path"
-#define MSG_BUNDLE_KEY_MM_PATH "PATH"
-
-#define MSG_BUNDLE_KEY_CALLER "CALLER"
-#define MSG_BUNDLE_KEY_RESOLUTION "RESOLUTION"
-#define MSG_BUNDLE_KEY_LIMIT "LIMIT"
-#define MSG_BUNDLE_KEY_SIZE "SIZE"
-#define MSG_BUNDLE_KEY_QUALITY "QUALITY"
-
-#define MSG_BUNDLE_KEY_LAUNCH_APPLICATION "launching_application"
-#define MSG_BUNDLE_KEY_VIEWER_MESSAGE "msg_viewer_message"
-
-#define MSG_BUNDLE_KEY_RESULT "result"
-#define MSG_BUNDLE_KEY_MODE "mode"
-#define MSG_BUNDLE_KEY_DESTROY "destroy"
-#define MSG_BUNDLE_KEY_NUMBER "number"
-#define MSG_BUNDLE_KEY_MAX "max"
-#define MSG_BUNDLE_KEY_PWD_RESULT "Result"
-#define MSG_BUNDLE_KEY_FROM "from"
-#define MSG_BUNDLE_KEY_LAYOUT "layout"
-
-#define MSG_BUNDLE_KEY_VCALL_TYPE "KEY_CALL_TYPE"
-#define MSG_BUNDLE_KEY_VCALL_HANDLE "KEY_CALL_HANDLE"
-#define MSG_BUNDLE_KEY_VCALL_PARTY_NUM "KEY_CALLING_PARTY_NUMBER"
-#define MSG_BUNDLE_KEY_VCALL_CLI_CAUSE "KEY_CLI_CAUSE"
-#define MSG_BUNDLE_KEY_VCALL_FORWARDED "KEY_FORWARDED"
-#define MSG_BUNDLE_KEY_DRMTYPE "drm_type"
-#define MSG_BUNDLE_KEY_SYSPOPUP_CONTENT "_SYSPOPUP_CONTENT_"
-
-/* Bundle value name */
-#define MSG_BUNDLE_VALUE_COMPOSE "compose"
-#define MSG_BUNDLE_VALUE_SMS_URI "sms"
-#define MSG_BUNDLE_VALUE_MMSTO_URI "mmsto"
-#define MSG_BUNDLE_VALUE_FILE_URI "file"
-#define MSG_BUNDLE_VALUE_NEW_MSG "new_msg"
-#define MSG_BUNDLE_VALUE_MSG_ID "msg_id"
-#define MSG_BUNDLE_VALUE_INTERNAL "internal"
-#define MSG_BUNDLE_VALUE_EDIT "edit"
-#define MSG_BUNDLE_VALUE_FORWARD "forward"
-#define MSG_BUNDLE_VALUE_NORMAL "normal"
-
-#define MSG_BUNDLE_VALUE_IMAGE "IMAGE"
-#define MSG_BUNDLE_VALUE_VIDEO "VIDEO"
-#define MSG_BUNDLE_VALUE_SOUND "SOUND"
-#define MSG_BUNDLE_VALUE_ALL "ALL"
-#define MSG_BUNDLE_VALUE_GALLERY_ALL "all"
-#define MSG_BUNDLE_VALUE_MULTI_FILE "MULTI_FILE"
-#define MSG_BUNDLE_VALUE_OTHERS "OTHERS"
-#define MSG_BUNDLE_VALUE_FILE "file"
-#define MSG_BUNDLE_VALUE_SELECT "select"
-#define MSG_BUNDLE_VALUE_SELECT_MULTIPLE "select-multiple"
-
-#define MSG_BUNDLE_VALUE_GET "get"
-
-#define MSG_BUNDLE_VALUE_SEARCH_MODE "search_mode"
-#define MSG_BUNDLE_VALUE_NO_CONTENT "no_content"
-
-#define MSG_BUNDLE_VALUE_DEL_ALL "del_all"
-#define MSG_BUNDLE_VALUE_FORWARDED "forwarded"
-
-#define MSG_BUNDLE_VALUE_DESTROY "destroy"
-#define MSG_BUNDLE_VALUE_ERROR "error"
-#define MSG_BUNDLE_VALUE_SENT "sent"
-#define MSG_BUNDLE_VALUE_RESET "reset"
-#define MSG_BUNDLE_VALUE_FOCUS_IN "focus_in"
-
-#define MSG_BUNDLE_VALUE_VGA "VGA"
-#define MSG_BUNDLE_VALUE_QCIF "QCIF"
-#define MSG_BUNDLE_VALUE_LOW "LOW"
-#define MSG_BUNDLE_VALUE_CAM_LIMIT_SIZE "295" /* Limit size of camcoder in message composer */
-#define MSG_BUNDLE_VALUE_VR_LIMIT_SIZE "300" /* Limit size of voice recorder in message composer */
-
-#define MSG_BUNDLE_VALUE_PREVIEW_MODE "preview_mode"
-#define MSG_BUNDLE_VALUE_CALENDAR_MAX "3"
-
-#define MSG_BUNDLE_VALUE_EMAIL_COMPOSE "5"
-
-#define MSG_BUNDLE_VALUE_CALL_MO "MO" /* "MO" : normal call, "EMERGENCY" : emergency call */
-#define MSG_BUNDLE_VALUE_VCALL_MO "mo"
-#define MSG_BUNDLE_VALUE_VCALL_HANDLE "1"
-#define MSG_BUNDLE_VALUE_VCALL_FALSE "-1"
-#define MSG_BUNDLE_VALUE_AUTO_REJECT_LIST "1"
-#define MSG_BUNDLE_VALUE_CONTACT_CHECK_LIST "46"
-
-#define MSG_BUNDLE_VALUE_DRM_WITHOUT_FL "DRM_WITHOUT_FL"
-
-#define MSG_BUNDLE_VALUE_SPAM_SETTING "spam_setting"
-
-#define MSG_BUNDLE_VALUE_MSGBOX_PROTECTED "protected_msgbox"
-#define MSG_BUNDLE_VALUE_MSGBOX_SPAM "spam_msgbox"
-
-#define MSG_BUNDLE_VALUE_INDICATOR "indicator"
-#define MSG_BUNDLE_VALUE_NO_INDICATOR "no_indicator"
-
-#endif /* __MSG_BUNDLE_H__ */
-
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(msg-common C)
+
+SET(VERSION 0.1.0)
+#################################
+# Message Common #
+#################################
+
+SET(COMMON_SRCS
+ ./msg-ui-common-utility.c
+)
+
+INCLUDE_DIRECTORIES(
+ ${CMAKE_SOURCE_COMMON_DIR}
+)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED
+ appsvc
+ bundle
+ capi-appfw-application contacts-service
+ dlog drm-client drm-trusted
+ elementary ecore ecore-x ecore-input ecore-imf ecore-file eina
+ glib-2.0
+ heynoti
+ icu-i18n
+ msg-service
+ mm-common mm-player mm-session
+ ui-gadget-1
+ utilX
+ vconf
+ syspopup-caller
+ capi-media-sound-manager
+ capi-system-system-settings
+ capi-media-metadata-extractor
+ capi-media-image-util
+ capi-media-player
+ status
+ libexif
+ tapi
+)
+
+FOREACH(flag ${pkgs_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+
+ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{PREFIX}\"")
+ADD_DEFINITIONS("-DDATAFS=\"$ENV{DATADIR}\"")
+ADD_DEFINITIONS("-DTARGET")
+ADD_DEFINITIONS("-DSLP_PROF")
+
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${COMMON_SRCS})
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION} )
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} ${CMAKE_LDFLAGS})
+
+ADD_CUSTOM_TARGET(msg_common.edj
+ COMMAND edje_cc -id
+ ${CMAKE_SOURCE_COMMON_DIR}/data/edc_image
+ ${CMAKE_SOURCE_COMMON_DIR}/data/msg_common.edc
+ ${CMAKE_SOURCE_COMMON_DIR}/data/msg_common.edj
+ DEPENDS ${CMAKE_SOURCE_COMMON_DIR}/data/msg_common.edc
+)
+
+ADD_CUSTOM_TARGET(msg_custom_winset.edj
+ COMMAND edje_cc -id
+ ${CMAKE_SOURCE_COMMON_DIR}/data/edc_image
+ ${CMAKE_SOURCE_COMMON_DIR}/data/msg_custom_winset.edc
+ ${CMAKE_SOURCE_COMMON_DIR}/data/msg_custom_winset.edj
+ DEPENDS ${CMAKE_SOURCE_COMMON_DIR}/data/msg_custom_winset.edc
+)
+
+ADD_DEPENDENCIES(${PROJECT_NAME} msg_common.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} msg_custom_winset.edj)
+
+# Install so files.
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
+INSTALL(FILES ${CMAKE_SOURCE_COMMON_DIR}/data/msg_common.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_SOURCE_COMMON_DIR}/data/msg_custom_winset.edj DESTINATION ${EDJDIR})