From e3e727cc32de583068d05387fd8d54baaf741801 Mon Sep 17 00:00:00 2001 From: Denis Dolzhenko Date: Tue, 14 Jun 2016 18:23:23 +0300 Subject: [PATCH] TizenRefApp-6412 My Profile Displayed as Unsaved Number in Messages(part I) Change-Id: I26ca9f5476d07444a7a2c78415d523c3dd457ace Signed-off-by: Denis Dolzhenko --- Build/basedef.mk | 64 ++++- Build/flags.mk | 4 +- Build/makefile | 288 ++++----------------- Build/prepost.mk | 11 +- Build/tooldef.mk | 50 ---- CMakeLists.txt | 1 + packaging/message.spec | 2 + project_def.prop | 7 +- src/Common/AppControl/inc/ContactViewer.h | 30 ++- src/Common/AppControl/src/ContactViewer.cpp | 32 ++- .../{ContactPersonAddress.h => ContactAddress.h} | 37 +-- src/Common/ContactManager/inc/ContactManager.h | 45 +++- .../{ContactOwnerProfile.h => ContactMyProfile.h} | 25 +- .../ContactManager/inc/ContactMyProfileEmail.h | 102 ++++++++ .../ContactManager/inc/ContactMyProfileNumber.h | 102 ++++++++ src/Common/ContactManager/inc/ContactPersonEmail.h | 24 +- .../ContactManager/inc/ContactPersonNumber.h | 24 +- src/Common/ContactManager/inc/ContactRecord.h | 7 +- src/Common/ContactManager/src/ContactManager.cpp | 110 +++++++- src/Common/Controller/src/FrameController.cpp | 2 +- src/Common/Controller/src/MbeRecipients.cpp | 2 +- src/Common/MsgEngine/inc/MsgUtils.h | 1 + src/Common/MsgEngine/src/MsgUtils.cpp | 11 + src/Common/Utils/inc/PhoneNumberUtils.h | 40 +++ src/Common/Utils/src/PhoneNumberUtils.cpp | 54 ++++ src/Common/Utils/src/ThumbnailMaker.cpp | 4 +- .../ContactList/Controller/inc/ContactListItem.h | 4 +- .../ContactList/Controller/src/ContactListItem.cpp | 2 +- .../ContactList/Controller/src/ConvContactList.cpp | 2 +- .../Main/Controller/inc/Conversation.h | 2 +- .../Main/Controller/inc/PopupRecipientListItem.h | 28 +- .../Main/Controller/src/Conversation.cpp | 18 +- .../Main/Controller/src/PopupRecipientListItem.cpp | 27 +- .../Utils/src/MessageDetailContent.cpp | 2 +- src/MsgThread/Controller/inc/BaseThreadListItem.h | 4 +- .../Controller/src/BaseThreadListItem.cpp | 4 +- src/Viewer/Controller/src/Viewer.cpp | 6 +- 37 files changed, 743 insertions(+), 435 deletions(-) rename src/Common/ContactManager/inc/{ContactPersonAddress.h => ContactAddress.h} (55%) rename src/Common/ContactManager/inc/{ContactOwnerProfile.h => ContactMyProfile.h} (63%) create mode 100644 src/Common/ContactManager/inc/ContactMyProfileEmail.h create mode 100644 src/Common/ContactManager/inc/ContactMyProfileNumber.h create mode 100644 src/Common/Utils/inc/PhoneNumberUtils.h create mode 100644 src/Common/Utils/src/PhoneNumberUtils.cpp diff --git a/Build/basedef.mk b/Build/basedef.mk index 7cacafc..21643bc 100644 --- a/Build/basedef.mk +++ b/Build/basedef.mk @@ -2,13 +2,65 @@ C_DEPS += -SYSROOT := $(SBI_SYSROOT) +USES_EFL = yes -ROOTSTRAP_INCS := $(addprefix -I $(SYSROOT)/,$(PLATFORM_INCS_EX)) -EFL_INCS := +SYSROOT = $(SBI_SYSROOT) -RS_LIBRARIES := $(addprefix -l,$(RS_LIBRARIES_EX)) +ifneq ($(strip $(SYSROOT)),) -PLATFORM_INCS := $(ROOTSTRAP_INCS) $(EFL_INCS) \ - -I"$(SDK_PATH)/library" +ifeq ($(strip $(USES_EFL)),yes) +_EFL_INCS = ecore-1 \ + e_dbus-1 edje-1 eet-1 \ + efreet-1 eina-1 "eina-1/eina" \ + eio-1 embryo-1 \ + evas-1 elementary-1 ethumb-1 \ + efl-extension +_EFL_INC_ROOT = $(SYSROOT)/usr/include +EFL_INCS = $(addprefix -I $(_EFL_INC_ROOT)/,$(_EFL_INCS)) +endif +FLATFORM_INCS = $(EFL_INCS) \ + -I"$(SYSROOT)/usr/include/libxml2" \ + -I"$(SDK_PATH)/library" \ + -I"$(SYSROOT)/usr/include" \ + -I"$(SYSROOT)/usr/include/appcore-agent" \ + -I"$(SYSROOT)/usr/include/appfw" \ + -I"$(SYSROOT)/usr/include/badge" \ + -I"$(SYSROOT)/usr/include/base" \ + -I"$(SYSROOT)/usr/include/cairo" \ + -I"$(SYSROOT)/usr/include/calendar-service2" \ + -I"$(SYSROOT)/usr/include/ckm" \ + -I"$(SYSROOT)/usr/include/contacts-svc" \ + -I"$(SYSROOT)/usr/include/content" \ + -I"$(SYSROOT)/usr/include/context-manager" \ + -I"$(SYSROOT)/usr/include/device" \ + -I"$(SYSROOT)/usr/include/dlog" \ + -I"$(SYSROOT)/usr/include/dbus-1.0" \ + -I"$(SYSROOT)/usr/include/ewebkit2-0" \ + -I"$(SYSROOT)/usr/include/fontconfig" \ + -I"$(SYSROOT)/usr/include/freetype2" \ + -I"$(SYSROOT)/usr/include/gio-unix-2.0" \ + -I"$(SYSROOT)/usr/include/glib-2.0" \ + -I"$(SYSROOT)/usr/include/json-glib-1.0" \ + -I"$(SYSROOT)/usr/include/json-glib-1.0/json-glib" \ + -I"$(SYSROOT)/usr/include/location" \ + -I"$(SYSROOT)/usr/include/media" \ + -I"$(SYSROOT)/usr/include/media-content" \ + -I"$(SYSROOT)/usr/include/messaging" \ + -I"$(SYSROOT)/usr/include/minizip" \ + -I"$(SYSROOT)/usr/include/network" \ + -I"$(SYSROOT)/usr/include/notification" \ + -I"$(SYSROOT)/usr/include/sensor" \ + -I"$(SYSROOT)/usr/include/shortcut" \ + -I"$(SYSROOT)/usr/include/storage" \ + -I"$(SYSROOT)/usr/include/system" \ + -I"$(SYSROOT)/usr/include/telephony" \ + -I"$(SYSROOT)/usr/include/ui" \ + -I"$(SYSROOT)/usr/include/web" \ + -I"$(SYSROOT)/usr/include/wifi-direct" \ + -I"$(SYSROOT)/usr/lib/dbus-1.0/include" \ + -I"$(SYSROOT)/usr/lib/glib-2.0/include" \ + -I"$(SYSROOT)/usr/include/appcore-watch" \ + -I"$(SYSROOT)/usr/include/widget_service" + +endif diff --git a/Build/flags.mk b/Build/flags.mk index 147ba78..7ca728e 100644 --- a/Build/flags.mk +++ b/Build/flags.mk @@ -7,9 +7,9 @@ CPP_OPTIMIZATION_OP = -O0 COMPILE_FLAGS = $(DEBUG_OP) $(OPTIMIZATION_OP) -CPP_COMPILE_FLAGS = $(CPP_DEBUG_OP) $(CPP_OPTIMIZATION_OP) -std=c++0x -Wall -c -fmessage-length=0 -std=c++0x -Wno-extern-c-compat -fPIC +CPP_COMPILE_FLAGS = $(CPP_DEBUG_OP) $(CPP_OPTIMIZATION_OP) -std=c++0x -Wall -c -fmessage-length=0 -std=c++0x -Wno-extern-c-compat -LINK_FLAGS = -shared -Wl,--no-undefined +LINK_FLAGS = AR_FLAGS = diff --git a/Build/makefile b/Build/makefile index 4e2d6c5..22f321d 100644 --- a/Build/makefile +++ b/Build/makefile @@ -1,86 +1,40 @@ -BUILD_SCRIPT_VERSION := 1.0.7 - -all : app_build - -clean : app_clean - -version : make_version - - -BSLASH := \\# -BSLASH2SLASH = $(subst $(BSLASH),/,$(1)) -REMOVE_TAIL = $(patsubst %/,%,$(1)) - -PROJ_ROOT := $(call BSLASH2SLASH,$(PROJPATH)) +APPTYPE = $(type) +PROJ_ROOT = $(PROJPATH) -include $(PROJ_ROOT)/project_def.prop -include basedef.mk -include tooldef.mk --include flags.mk --include prepost.mk -APPTYPE := $(type) +ifeq ($(strip $(BUILD_CONFIG)),) +BUILD_CONFIG = Debug +endif -OBJ_OUTPUT := $(call BSLASH2SLASH,$(OUTPUT_DIR)/objs) +OUTPUT_DIR = $(PROJ_ROOT)/$(BUILD_CONFIG) +OBJ_OUTPUT = $(OUTPUT_DIR)/objs -OS_NAME = $(shell $(UNAME)) +SRCS = $(USER_SRCS) +EDCS = $(USER_EDCS) +CDEFS += $(addprefix -D ,$(USER_DEFS)) +INCS += $(addprefix -I $(PROJ_ROOT)/,$(USER_INC_DIRS)) +LIBS += $(addprefix -l,$(USER_LIBS)) +UOBJS += $(addprefix $(PROJ_ROOT)/,$(USER_OBJS)) -#LOWER_APPNAME := $(shell echo translit($(APPNAME),[A-Z],[a-z])|$(M4)) -LOWER_APPNAME := $(shell echo $(APPNAME)|$(TR) [A-Z] [a-z]) +OBJS = $(patsubst %.c,$(OBJ_OUTPUT)/%.o,$(SRCS)) +EDJ_FILES = $(patsubst %.edc,$(OUTPUT_DIR)/%.edj,$(EDCS)) +DEPS = $(OBJS:.o=.d) +M_OPT = -MMD -MP -MF"$(@:%.o=%.d)" ifeq ($(strip $(APPTYPE)),app) -APPFILE := $(OUTPUT_DIR)/$(LOWER_APPNAME) +APPFILE = $(OUTPUT_DIR)/$(APPNAME) endif ifeq ($(strip $(APPTYPE)),staticLib) -APPFILE := $(OUTPUT_DIR)/lib$(LOWER_APPNAME).a +APPFILE = $(OUTPUT_DIR)/lib$(APPNAME).a endif ifeq ($(strip $(APPTYPE)),sharedLib) -APPFILE := $(OUTPUT_DIR)/lib$(LOWER_APPNAME).so +APPFILE = $(OUTPUT_DIR)/lib$(APPNAME).so endif -ifneq ($(strip $(PLATFORM_INCS)),) -PLATFORM_INCS_FILE := $(OBJ_OUTPUT)/platform_incs_file.inc -endif - -FIND_FILES = $(shell $(FIND) $(PROJ_ROOT)/$(dir $(1)) -type f -name $(notdir $(1)) -printf '$(dir $(1))%P ') - -NORMAL_SRCS := $(filter-out %*.c %*.cpp,$(USER_SRCS)) -WIDLCARD_SRCS := $(filter %*.c %*.cpp,$(USER_SRCS)) -ALL_SRCS := $(NORMAL_SRCS) $(foreach var,$(WIDLCARD_SRCS),$(call FIND_FILES,$(var))) - -C_SRCS := $(filter %.c,$(ALL_SRCS)) -CPP_SRCS := $(filter %.cpp,$(ALL_SRCS)) - -USER_EDCS := $(subst $(BSLASH),/,$(USER_EDCS)) -NORMAL_EDCS := $(filter-out %*.edc,$(USER_EDCS)) -WIDLCARD_EDCS := $(filter %*.edc,$(USER_EDCS)) -EDCS := $(NORMAL_EDCS) $(foreach var,$(WIDLCARD_EDCS),$(call FIND_FILES,$(var))) - -NORMAL_POS := $(filter-out %*.po,$(USER_POS)) -WIDLCARD_POS := $(filter %*.po,$(USER_POS)) -POS := $(NORMAL_POS) $(foreach var,$(WIDLCARD_POS),$(call FIND_FILES,$(var))) - -LIBPATHS := $(addprefix -L$(PROJ_ROOT)/,$(USER_LIB_DIRS)) \ - $(addprefix -L,$(USER_LIB_DIRS_ABS)) -LIBS += $(addprefix -l,$(USER_LIBS)) -UOBJS := $(addprefix $(PROJ_ROOT)/,$(USER_OBJS)) \ - $(USER_OBJS_ABS) - -M_OPT = -MMD -MP -MF"$(@:%.o=%.d)" - -FUNC_C2O = $(patsubst %.c,$(OBJ_OUTPUT)/%.o,$(1)) -FUNC_CPP2O = $(patsubst %.cpp,$(OBJ_OUTPUT)/%.o,$(1)) -FUNC_EDC2EDJ = $(patsubst %.edc,$(OUTPUT_DIR)/%.edj,$(1)) -FUNC_PO2MO = $(patsubst %.po,$(OUTPUT_DIR)/res/locale/%/LC_MESSAGES/$(LOWER_APPNAME).mo,$(notdir $(1))) - - -C_OBJS := $(call FUNC_C2O,$(C_SRCS)) -CPP_OBJS := $(call FUNC_CPP2O,$(CPP_SRCS)) -OBJS := $(C_OBJS) $(CPP_OBJS) -EDJ_FILES := $(call FUNC_EDC2EDJ,$(EDCS)) -MO_FILES := $(call FUNC_PO2MO,$(POS)) -DEPS := $(OBJS:.o=.d) - +all : $(APPFILE) secondary-outputs ifneq ($(strip $(DEPS)),) -include $(DEPS) @@ -88,188 +42,48 @@ endif ifeq ($(strip $(APPTYPE)),app) $(APPFILE) : $(OBJS) $(UOBJS) - @echo ' Building target: $@' - @echo ' Invoking: C/C++ Linker' - @$(MKDIR) $(MKDIR_OP) $(subst $(BSLASH),/,$(@D)) - $(CXX) -o "$(APPFILE)" $(OBJS) $(UOBJS) $(LIBPATHS) -Xlinker --as-needed $(LIBS) $(LINK_FLAGS) $(TC_LINKER_MISC) $(RS_LINKER_MISC) -pie -lpthread -Xlinker -rpath="/home/developer/sdk_tools/lib" --sysroot="$(SYSROOT)" -Xlinker --version-script="$(PROJ_PATH)/.exportMap" -L"$(SBI_SYSROOT)/usr/lib" $(RS_LIBRARIES) -Xlinker -rpath="/opt/usr/apps/$(APPID)/lib" -Werror-implicit-function-declaration - @echo ' Finished building target: $@' + @echo ' > Building target: $@' + @echo ' > Invoking: C++ Linker' + $(MKDIR) $(MKDIR_OP) $(@D) + $(CXX) -o "$(APPFILE)" $(OBJS) $(UOBJS) $(LIBS) -L"$(PROJ_PATH)/lib" $(TC_LINKER_MISC) $(RS_LINKER_MISC) -pie -lpthread -Xlinker -rpath="/home/developer/sdk_tools/lib" --sysroot="$(SYSROOT)" -Xlinker --version-script="$(PROJ_PATH)/.exportMap" -L"$(SBI_SYSROOT)/usr/lib" $(RS_LIBRARIES) -Xlinker -rpath="/opt/usr/apps/$(APPID)/lib" -Werror-implicit-function-declaration + @echo ' > Finished building target: $@' endif ifeq ($(strip $(APPTYPE)),staticLib) $(APPFILE) : $(OBJS) $(UOBJS) - @echo ' Building target: $@' - @echo ' Invoking: Archive utility' - @$(MKDIR) $(MKDIR_OP) $(subst $(BSLASH),/,$(@D)) - $(AR) -r "$(APPFILE)" $(OBJS) $(UOBJS) $(AR_FLAGS) - @echo ' Finished building target: $@' + @echo ' > Building target: $@' + @echo ' > Invoking: C++ Linker' + $(MKDIR) $(MKDIR_OP) $(@D) + $(AR) -r "$(APPFILE)" $(OBJS) $(UOBJS) $(LIBS) + @echo ' > Finished building target: $@' endif ifeq ($(strip $(APPTYPE)),sharedLib) $(APPFILE) : $(OBJS) $(UOBJS) - @echo ' Building target: $@' - @echo ' Invoking: C/C++ Linker' - @$(MKDIR) $(MKDIR_OP) $(subst $(BSLASH),/,$(@D)) - $(CXX) -o "$(APPFILE)" $(OBJS) $(UOBJS) $(LIBPATHS) -Xlinker --as-needed $(LIBS) $(LINK_FLAGS) $(TC_LINKER_MISC) $(RS_LINKER_MISC) -shared -lpthread --sysroot="$(SYSROOT)" -L"$(SYSROOT)/usr/lib" $(RS_LIBRARIES) - @echo ' Finished building target: $@' -endif - - -ifneq ($(strip $(C_SRCS)),) -CDEFS += $(addprefix -D,$(USER_DEFS)) -CDEFS += $(addprefix -U,$(USER_UNDEFS)) - -INCS := $(addprefix -I$(PROJ_ROOT)/,$(USER_INC_DIRS)) \ - $(addprefix -I,$(USER_INC_DIRS_ABS)) \ - $(addprefix -include$(PROJ_ROOT)/,$(USER_INC_FILES)) \ - $(addprefix -include,$(USER_INC_FILES_ABS)) - -$(C_OBJS) : $(OBJ_OUTPUT)/%.o : $(PROJ_ROOT)/%.c $(PLATFORM_INCS_FILE) - @echo ' Building file: $<' - @echo ' Invoking: C Compiler' - @$(MKDIR) $(MKDIR_OP) $(subst $(BSLASH),/,$(@D)) -ifeq ($(strip $(APPTYPE)),sharedLib) - $(CC) -c $< -o $@ $(CDEFS) $(INCS) -I"pch" $(COMPILE_FLAGS) $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) -fPIC --sysroot="$(SYSROOT)" -Werror-implicit-function-declaration $(M_OPT) @$(PLATFORM_INCS_FILE) -else - $(CC) -c $< -o $@ $(CDEFS) $(INCS) -I"pch" $(COMPILE_FLAGS) $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) -fPIE --sysroot="$(SYSROOT)" -Werror-implicit-function-declaration $(M_OPT) @$(PLATFORM_INCS_FILE) -endif - @echo ' Finished building: $<' -endif - -ifneq ($(strip $(CPP_SRCS)),) -CPPDEFS += $(addprefix -D,$(USER_CPP_DEFS)) -CPPDEFS += $(addprefix -U,$(USER_CPP_UNDEFS)) - -CPP_INCS := $(addprefix -I$(PROJ_ROOT)/,$(USER_CPP_INC_DIRS)) \ - $(addprefix -I,$(USER_CPP_INC_DIRS_ABS)) \ - $(addprefix -include$(PROJ_ROOT)/,$(USER_CPP_INC_FILES)) \ - $(addprefix -include,$(USER_CPP_INC_FILES_ABS)) - -$(CPP_OBJS) : $(OBJ_OUTPUT)/%.o : $(PROJ_ROOT)/%.cpp $(PLATFORM_INCS_FILE) - @echo ' Building file: $<' - @echo ' Invoking: C++ Compiler' - @$(MKDIR) $(MKDIR_OP) $(subst $(BSLASH),/,$(@D)) -ifeq ($(strip $(APPTYPE)),sharedLib) - $(CXX) -c $< -o $@ $(CPPDEFS) $(CPP_INCS) -I"pch" $(CPP_COMPILE_FLAGS) $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) -fPIC --sysroot="$(SYSROOT)" -Werror-implicit-function-declaration $(M_OPT) @$(PLATFORM_INCS_FILE) -else - $(CXX) -c $< -o $@ $(CPPDEFS) $(CPP_INCS) -I"pch" $(CPP_COMPILE_FLAGS) $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) -fPIE --sysroot="$(SYSROOT)" -Werror-implicit-function-declaration $(M_OPT) @$(PLATFORM_INCS_FILE) -endif - @echo ' Finished building: $<' + @echo ' > Building target: $@' + @echo ' > Invoking: C++ Linker' + $(MKDIR) $(MKDIR_OP) $(@D) + $(CXX) -o "$(APPFILE)" $(OBJS) $(UOBJS) $(LIBS) -L"$(PROJ_PATH)/lib" -shared -Wl,--no-undefined $(TC_LINKER_MISC) $(RS_LINKER_MISC) -lpthread --sysroot="$(SYSROOT)" -L"$(SYSROOT)/usr/lib" $(RS_LIBRARIES) + @echo ' > Finished building target: $@' endif +$(OBJS) : + @echo ' > Building file: $(subst $(OBJ_OUTPUT)/,,$(@:.o=.c))' + @echo ' > Invoking: C Compiler' + $(MKDIR) $(MKDIR_OP) $(@D) + $(CC) -c "$(PROJ_ROOT)/$(subst $(OBJ_OUTPUT)/,,$(@:.o=.c))" -o $@ $(CDEFS) $(INCS) -I"pch" $(OPTIMIZATION_OP) $(DEBUG_OP) -Wall -c -fmessage-length=0 $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) -fPIE --sysroot="$(SYSROOT)" $(FLATFORM_INCS) -Werror-implicit-function-declaration $(M_OPT) + @echo ' > Finished building: $(subst $(OBJ_OUTPUT)/,,$(@:.o=.c))' -$(OBJ_OUTPUT) : - @echo ' Building directory: $@' - @$(MKDIR) $(MKDIR_OP) $(OBJ_OUTPUT) - -preproc : $(OBJ_OUTPUT) -ifneq ($(strip $(PREBUILD_COMMAND)),) -ifneq ($(strip $(PREBUILD_DESC)),) - @echo $(PREBUILD_DESC) -endif - @echo $(shell $(PREBUILD_COMMAND)) -endif - - -postproc : -ifneq ($(strip $(POSTBUILD_COMMAND)),) -ifneq ($(strip $(POSTBUILD_DESC)),) - @echo $(POSTBUILD_DESC) -endif - @echo $(shell $(POSTBUILD_COMMAND)) -endif - -ifneq ($(strip $(PLATFORM_INCS)),) -$(PLATFORM_INCS_FILE) : $(OBJ_OUTPUT) - @echo ' Building inc file: $@' -ifneq ($(findstring Linux,$(OS_NAME)),) - @echo $(PLATFORM_INCS) > $@ -else -ifneq ($(findstring 3.82,$(MAKE_VERSION)),) - $(file > $@,$(PLATFORM_INCS)) -else - @echo $(PLATFORM_INCS) > $@ -endif -endif -endif - -ALL_EDJ_FILES := -define EDJ_PROC -ALL_EDCS := $$(subst $(BSLASH),/,$$($(2))) -NORMAL_EDCS := $$(filter-out %*.edc,$$(ALL_EDCS)) -WIDLCARD_EDCS := $$(filter %*.edc,$$(ALL_EDCS)) -EDCS := $$(NORMAL_EDCS) $$(foreach var_edc,$$(WIDLCARD_EDCS),$$(call FIND_FILES,$$(var_edc))) +secondary-outputs : $(MO_FILES) $(EDJ_FILES) -ifneq ($$(strip $$(EDCS)),) -EDJ_FILES := $$(call FUNC_EDC2EDJ,$$(EDCS)) - -ALL_EDJ_FILES += $$(EDJ_FILES) - -EDC_$(1)_COMPILER_FLAGS := -id "$$(SDK_TOOLPATH)/enventor/share/enventor/images" -EDC_$(1)_COMPILER_FLAGS += -sd "$$(SDK_TOOLPATH)/enventor/share/enventor/sounds" -EDC_$(1)_COMPILER_FLAGS += -fd "$$(SDK_TOOLPATH)/enventor/share/enventor/fonts" - -ifneq ($$(strip $(3)),) -EDC_$(1)_COMPILER_FLAGS += $$(addprefix -id $$(PROJ_PATH)/,$$($(3))) -endif -ifneq ($$(strip $(4)),) -EDC_$(1)_COMPILER_FLAGS += $$(addprefix -id ,$$($(4))) -endif -ifneq ($$(strip $(5)),) -EDC_$(1)_COMPILER_FLAGS += $$(addprefix -sd $$(PROJ_PATH)/,$$($(5))) -endif -ifneq ($$(strip $(6)),) -EDC_$(1)_COMPILER_FLAGS += $$(addprefix -sd ,$$($(6))) -endif -ifneq ($$(strip $(7)),) -EDC_$(1)_COMPILER_FLAGS += $$(addprefix -fd $$(PROJ_PATH)/,$$($(7))) -endif -ifneq ($$(strip $(8)),) -EDC_$(1)_COMPILER_FLAGS += $$(addprefix -fd ,$$($(8))) +ifneq ($(strip $(EDJ_FILES)),) +$(EDJ_FILES) : + @echo ' > Building file: $(subst $(OBJ_OUTPUT)/,,$(@:.edj=.edc))' + @echo ' > Invoking: EDC Resource Compiler' + $(MKDIR) $(MKDIR_OP) $(@D) + $(EDJE_CC) -id "$(PROJ_PATH)/edje/images" -id "$(SDK_TOOLPATH)/enventor/share/enventor/images" -sd "$(PROJ_PATH)/edje/sounds" -sd "$(SDK_TOOLPATH)/enventor/share/enventor/sounds" -fd "$(PROJ_PATH)/edje/fonts" -fd "$(SDK_TOOLPATH)/enventor/share/enventor/fonts" $(PROJ_ROOT)/$(subst $(OUTPUT_DIR)/,,$(@:.edj=.edc)) "$@" + @echo ' > Finished building: $(subst $(OBJ_OUTPUT)/,,$(@:.edj=.edc))' endif -$$(EDJ_FILES) : $$(OUTPUT_DIR)/%.edj : $$(PROJ_ROOT)/%.edc - @echo ' Building file: $$<' - @echo ' Invoking: EDC Resource Compiler' - @$$(MKDIR) $$(MKDIR_OP) $$(subst $$(BSLASH),/,$$(@D)) - $$(EDJE_CC) $$(EDC_$(1)_COMPILER_FLAGS) $$(CDEFS) "$$<" "$$@" - @echo ' Finished building: $$<' -endif -endef - -# Global EDCs -ifneq ($(strip $(USER_EDCS)),) -$(eval $(call EDJ_PROC,,USER_EDCS,USER_EDCS_IMAGE_DIRS,USER_EDCS_IMAGE_DIRS_ABS,USER_EDCS_SOUND_DIRS,USER_EDCS_SOUND_DIRS_ABS,USER_EDCS_FONT_DIRS,USER_EDCS_FONT_DIRS_ABS)) -endif - -# Individual EDCs -ifneq ($(strip $(USER_EXT_EDC_KEYS)),) -$(foreach var,$(USER_EXT_EDC_KEYS),$(eval $(call EDJ_PROC,$(var),USER_EXT_$(var)_EDCS,USER_EXT_$(var)_EDCS_IMAGE_DIRS,USER_EXT_$(var)_EDCS_IMAGE_DIRS_ABS,USER_EXT_$(var)_EDCS_SOUND_DIRS,USER_EXT_$(var)_EDCS_SOUND_DIRS_ABS,USER_EXT_$(var)_EDCS_FONT_DIRS,USER_EXT_$(var)_EDCS_FONT_DIRS_ABS))) -endif - - -ifneq ($(strip $(POS)),) -define MO_RULE -$(call FUNC_PO2MO,$(1)) : $(PROJ_ROOT)/$(1) - @echo ' Building file: $$<' - @echo ' Invoking: msgfmt String Formatter' - @$$(MKDIR) $$(MKDIR_OP) $$(subst $$(BSLASH),/,$$(@D)) - $$(MSGFMT) -o $$@ $$< - @echo ' Finished building: $$<' -endef - -$(foreach var,$(POS),$(eval $(call MO_RULE,$(var)))) -endif - - -secondary-outputs : $(ALL_EDJ_FILES) $(MO_FILES) - --include appendix.mk - - -app_build : preproc $(APPFILE) secondary-outputs postproc - -app_clean : +clean : rm -f "$(APPFILE)" rm -rf "$(OUTPUT_DIR)" - -make_version : - @echo $(BUILD_SCRIPT_VERSION) diff --git a/Build/prepost.mk b/Build/prepost.mk index a8a4d87..6bb5e2f 100644 --- a/Build/prepost.mk +++ b/Build/prepost.mk @@ -1,7 +1,6 @@ -# Add pre/post build process - -PREBUILD_COMMAND = -PREBUILD_DESC = -POSTBUILD_COMMAND = -POSTBUILD_DESC = +# Add pre/post build process +PREBUILD_DESC = +PREBUILD_COMMAND = +POSTBUILD_DESC = +POSTBUILD_COMMAND = diff --git a/Build/tooldef.mk b/Build/tooldef.mk index 4244fb3..2e2c04d 100644 --- a/Build/tooldef.mk +++ b/Build/tooldef.mk @@ -1,14 +1,5 @@ # Add inputs and outputs from these tool invocations to the build variables -ifeq ($(strip $(BUILD_CONFIG)),) -BUILD_CONFIG = Debug -endif - -ifeq ($(strip $(OUTPUT_DIR)),) -OUTPUT_DIR := $(PROJPATH)/$(BUILD_CONFIG) -endif - - ifneq ($(strip $(MKDIR_BIN)),) MKDIR = $(MKDIR_BIN) MKDIR_OP = -p @@ -17,45 +8,4 @@ MKDIR = mkdir MKDIR_OP = -p endif -ifneq ($(strip $(UNAME_BIN)),) -UNAME = $(UNAME_BIN) -else -UNAME = uname -endif - -ifneq ($(strip $(M4_BIN)),) -M4 = $(M4_BIN) -else -M4 = m4 -endif - -ifneq ($(strip $(TR_BIN)),) -TR = $(TR_BIN) -else -TR = tr -endif - -ifneq ($(strip $(FIND_BIN)),) -FIND = $(FIND_BIN) -else -FIND = find -endif - -ifneq ($(strip $(GREP_BIN)),) -GREP = $(GREP_BIN) -else -GREP = grep -endif - -ifneq ($(strip $(EDJE_CC_BIN)),) -EDJE_CC = $(EDJE_CC_BIN) -else EDJE_CC = edje_cc -endif - -ifneq ($(strip $(MSGFMT_BIN)),) -MSGFMT = $(MSGFMT_BIN) -else -MSGFMT = msgfmt -endif - diff --git a/CMakeLists.txt b/CMakeLists.txt index cd63134..10230ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,6 +74,7 @@ pkg_check_modules(pkgs REQUIRED efl-extension storage attach-panel + phonenumber-utils ) ADD_DEFINITIONS("-DAPP_DIR=\"${PKGDIR}\"") diff --git a/packaging/message.spec b/packaging/message.spec index 08c9130..bca1c33 100755 --- a/packaging/message.spec +++ b/packaging/message.spec @@ -50,6 +50,8 @@ BuildRequires: pkgconfig(efl-extension) BuildRequires: pkgconfig(capi-system-runtime-info) BuildRequires: pkgconfig(storage) BuildRequires: pkgconfig(attach-panel) +BuildRequires: pkgconfig(phonenumber-utils) + %if %TIZEN_2_4_BUILD == 0 BuildRequires: pkgconfig(libtzplatform-config) diff --git a/project_def.prop b/project_def.prop index 2f4ba09..44cffd0 100644 --- a/project_def.prop +++ b/project_def.prop @@ -9,14 +9,13 @@ type = app profile = mobile-3.0 # C Sources -USER_SRCS = src/MainApp/MainApp.cpp src/Common/AppControl/src/ContactViewer.cpp src/Common/AppControl/src/FileShare.cpp src/Common/View/src/PopupManager.cpp src/Common/MsgEngine/src/MsgPage.cpp src/Common/View/src/ViewItem.cpp src/Common/MsgEngine/src/private/MsgComposerPrivate.cpp src/Common/MsgEngine/src/MsgThreadItem.cpp src/Conversation/Body/View/src/TextPageViewItem.cpp src/Viewer/View/src/SmilImageItemView.cpp src/Common/MsgEngine/src/private/MsgAttachmentPrivate.cpp src/Viewer/View/src/SubjectLayout.cpp src/Settings/Controller/src/SimListViewItem.cpp src/Conversation/ContactList/View/src/ContactListViewItem.cpp src/Viewer/Controller/src/SmilPage.cpp src/Common/View/src/SelectAllListItem.cpp src/Common/AppControl/src/AppControlCommand.cpp src/Common/ContactManager/src/VcfGenerator.cpp src/Common/View/src/Box.cpp src/Conversation/ConvList/View/src/DateLineViewItem.cpp src/Conversation/ConvList/View/src/ConvListViewItem.cpp src/Common/MsgEngine/src/private/MessageSMSPrivate.cpp src/Viewer/View/src/ViewerLayout.cpp src/Common/MsgEngine/src/private/MessagePrivate.cpp src/Common/AppControl/src/AppControlCompose.cpp src/MsgThread/Controller/src/ThreadSearchListItem.cpp src/Conversation/Recipients/View/src/ConvRecipientsPanelView.cpp src/Common/Utils/src/HwButtonListener.cpp src/Common/View/src/PopupAttachmentListItem.cpp src/Common/View/src/ContextPopup.cpp src/Common/Controller/src/MbeRecipients.cpp src/MsgThread/Controller/src/MsgSearchListItem.cpp src/Conversation/Body/View/src/BodyView.cpp src/Common/View/src/NoContentLayout.cpp src/Conversation/Body/View/src/PageSeparator.cpp src/Conversation/Main/Controller/src/PopupRecipientListItem.cpp src/Settings/Controller/src/MsgOnSimCard.cpp src/Common/View/src/MbeRecipientsView.cpp src/Conversation/Body/Controller/src/Page.cpp src/Viewer/View/src/SmilAttachmentItemView.cpp src/Common/MsgEngine/src/MsgTransport.cpp src/Viewer/View/src/PlayerControl.cpp src/MsgThread/Controller/src/MsgThread.cpp src/Conversation/Body/View/src/ImagePageViewItem.cpp src/Conversation/ConvList/Controller/src/ConvListItem.cpp src/Common/View/src/StandardWindow.cpp src/Conversation/Main/View/src/ConversationLayout.cpp src/Common/MsgEngine/src/private/MsgConversationItemPrivate.cpp src/Conversation/ContactList/Controller/src/ConvContactList.cpp src/Conversation/Main/View/src/MessageInputPanel.cpp src/Viewer/Controller/src/Viewer.cpp src/Conversation/Body/View/src/MediaPageViewItem.cpp src/Settings/Controller/src/Settings.cpp src/Common/View/src/PopupList.cpp src/Common/MsgEngine/src/private/MsgReportPrivate.cpp src/Common/View/src/ListView.cpp src/Conversation/Utils/src/WorkingDir.cpp src/Conversation/Body/View/src/SoundPageViewItem.cpp src/Conversation/Body/View/src/BodyAttachmentViewItem.cpp src/Conversation/AppControl/src/AttachPanel.cpp src/Conversation/Body/View/src/PageView.cpp src/Common/Utils/src/ThumbnailMaker.cpp src/Settings/View/src/SettingsGroupListViewItem.cpp src/Conversation/Utils/src/AttachmentHandler.cpp src/Common/AppControl/src/FileViewer.cpp src/Common/MsgEngine/src/private/MsgUtilsPrivate.cpp src/MsgThread/Controller/src/ThreadSearchList.cpp src/Common/MsgEngine/src/private/MsgPagePrivate.cpp src/Common/MsgEngine/src/private/MsgThreadItemPrivate.cpp src/Viewer/View/src/SmilAudioItemView.cpp src/Common/Controller/src/SaveAttachmentsPopup.cpp src/Common/AppControl/src/AppControlParser.cpp src/Common/MsgEngine/src/MsgSettings.cpp src/Common/MsgEngine/src/MsgUtils.cpp src/Viewer/Controller/src/SmilPlayer.cpp src/Common/Controller/src/ViewItemController.cpp src/MsgThread/Controller/src/ThreadList.cpp src/Common/MsgEngine/src/MsgConversationItem.cpp src/MsgThread/Controller/src/BaseThreadListItem.cpp src/Conversation/Body/View/src/VideoPageViewItem.cpp src/Common/MsgEngine/src/MessageSMS.cpp src/Conversation/Body/Controller/src/PopupBodyAttachmentListItem.cpp src/Conversation/ConvList/View/src/BubbleView.cpp src/MsgThread/Controller/src/ThreadListItem.cpp src/Common/MsgEngine/src/private/MsgAddressPrivate.cpp src/Common/View/src/Scroller.cpp src/Viewer/View/src/SmilPageLayout.cpp src/Common/Controller/src/FrameController.cpp src/Common/Controller/src/NaviFrameController.cpp src/Common/AppControl/src/AppControlUtils.cpp src/Common/View/src/DefaultLayout.cpp src/Conversation/ContactList/Controller/src/ContactListItem.cpp src/Common/MsgEngine/src/private/MsgSettingsPrivate.cpp src/Common/MsgEngine/src/MsgStorage.cpp src/Common/Utils/src/FileUtils.cpp src/Common/Utils/src/LoggerImpl.cpp src/Conversation/ConvList/Controller/src/DateLineItem.cpp src/Common/View/src/PopupListItem.cpp src/Common/View/src/View.cpp src/Common/Utils/src/TextDecorator.cpp src/MainApp/main.cpp src/Common/Utils/src/PathUtils.cpp src/Conversation/Body/View/src/BodyViewItem.cpp src/Common/MsgEngine/src/private/MsgTransportPrivate.cpp src/Common/Controller/src/BaseController.cpp src/Common/Controller/src/App.cpp src/Viewer/View/src/SmilVideoItemView.cpp src/MsgThread/View/src/ThreadListViewItem.cpp src/Common/AppControl/src/ContactEditor.cpp src/Conversation/ConvList/View/src/ConvListLayout.cpp src/Common/MsgEngine/src/private/MsgConvMediaPrivate.cpp src/Common/Utils/src/MediaUtils.cpp src/Conversation/Recipients/Controller/src/ConvRecipientsPanel.cpp src/Conversation/ConvList/View/src/ConvSelectAll.cpp src/Common/View/src/Popup.cpp src/Common/MsgEngine/src/private/MsgStoragePrivate.cpp src/Common/MsgEngine/src/Message.cpp src/Common/View/src/ListItem.cpp src/Common/Utils/src/TimeUtils.cpp src/Viewer/Utils/src/MediaPlayer.cpp src/Conversation/Body/Controller/src/Body.cpp src/Settings/View/src/SettingsListViewItem.cpp src/Common/MsgEngine/src/MsgEngine.cpp src/Conversation/ContactList/View/src/ConvContactListView.cpp src/Conversation/AppControl/src/ContactPicker.cpp src/MsgThread/View/src/FloatingButton.cpp src/MsgThread/View/src/MsgThreadSearchPanel.cpp src/Settings/Controller/src/SettingsSound.cpp src/Settings/View/src/SimMsgLayout.cpp src/Common/MsgEngine/src/private/MsgMediaPrivate.cpp src/Common/AppControl/src/AppControlDefault.cpp src/Viewer/View/src/SmilTextItemView.cpp src/Common/ContactManager/src/ContactManager.cpp src/Common/View/src/NaviFrameView.cpp src/Common/MsgEngine/src/private/MessageMmsPrivate.cpp src/Conversation/ConvList/Controller/src/ConvList.cpp src/Conversation/Body/View/src/PageViewItem.cpp src/Common/Controller/src/ViewController.cpp src/Conversation/Main/Controller/src/Conversation.cpp src/Common/SystemSettingsManager/src/SystemSettingsManager.cpp src/Common/ContactManager/src/ContactRecord.cpp src/MsgThread/View/src/MsgThreadLayout.cpp src/Common/View/src/NaviFrameItem.cpp src/Common/MsgEngine/src/MessageMms.cpp src/Common/AppControl/src/VoiceCall.cpp src/Conversation/Utils/src/MessageDetailContent.cpp src/Viewer/View/src/SmilPlayerView.cpp -USER_SRCS_ABS = +USER_SRCS = src/MainApp/MainApp.cpp src/Common/AppControl/src/ContactViewer.cpp src/Common/View/src/PopupManager.cpp src/Common/MsgEngine/src/MsgPage.cpp src/Common/View/src/ViewItem.cpp src/Common/MsgEngine/src/private/MsgComposerPrivate.cpp src/Common/MsgEngine/src/MsgThreadItem.cpp src/Conversation/Body/View/src/TextPageViewItem.cpp src/Viewer/View/src/SmilImageItemView.cpp src/Common/MsgEngine/src/private/MsgAttachmentPrivate.cpp src/Viewer/View/src/SubjectLayout.cpp src/Settings/Controller/src/SimListViewItem.cpp src/Conversation/ContactList/View/src/ContactListViewItem.cpp src/Viewer/Controller/src/SmilPage.cpp src/Common/View/src/SelectAllListItem.cpp src/Common/AppControl/src/AppControlCommand.cpp src/Common/ContactManager/src/VcfGenerator.cpp src/Common/View/src/Box.cpp src/Conversation/ConvList/View/src/DateLineViewItem.cpp src/Conversation/ConvList/View/src/ConvListViewItem.cpp src/Common/MsgEngine/src/private/MessageSMSPrivate.cpp src/Viewer/View/src/ViewerLayout.cpp src/Common/MsgEngine/src/private/MessagePrivate.cpp src/Common/AppControl/src/AppControlCompose.cpp src/MsgThread/Controller/src/ThreadSearchListItem.cpp src/Conversation/Recipients/View/src/ConvRecipientsPanelView.cpp src/Common/Utils/src/HwButtonListener.cpp src/Common/View/src/PopupAttachmentListItem.cpp src/Common/View/src/ContextPopup.cpp src/Common/Controller/src/MbeRecipients.cpp src/MsgThread/Controller/src/MsgSearchListItem.cpp src/Conversation/Body/View/src/BodyView.cpp src/Common/View/src/NoContentLayout.cpp src/Conversation/Body/View/src/PageSeparator.cpp src/Conversation/Main/Controller/src/PopupRecipientListItem.cpp src/Settings/Controller/src/MsgOnSimCard.cpp src/Common/View/src/MbeRecipientsView.cpp src/Conversation/Body/Controller/src/Page.cpp src/Viewer/View/src/SmilAttachmentItemView.cpp src/Common/MsgEngine/src/MsgTransport.cpp src/Viewer/View/src/PlayerControl.cpp src/MsgThread/Controller/src/MsgThread.cpp src/Conversation/Body/View/src/ImagePageViewItem.cpp src/Conversation/ConvList/Controller/src/ConvListItem.cpp src/Common/View/src/StandardWindow.cpp src/Conversation/Main/View/src/ConversationLayout.cpp src/Common/MsgEngine/src/private/MsgConversationItemPrivate.cpp src/Conversation/ContactList/Controller/src/ConvContactList.cpp src/Conversation/Main/View/src/MessageInputPanel.cpp src/Viewer/Controller/src/Viewer.cpp src/Conversation/Body/View/src/MediaPageViewItem.cpp src/Common/Utils/src/PhoneNumberUtils.cpp src/Settings/Controller/src/Settings.cpp src/Common/View/src/PopupList.cpp src/Common/MsgEngine/src/private/MsgReportPrivate.cpp src/Common/View/src/ListView.cpp src/Conversation/Utils/src/WorkingDir.cpp src/Conversation/Body/View/src/SoundPageViewItem.cpp src/Conversation/Body/View/src/BodyAttachmentViewItem.cpp src/Conversation/AppControl/src/AttachPanel.cpp src/Conversation/Body/View/src/PageView.cpp src/Common/Utils/src/ThumbnailMaker.cpp src/Settings/View/src/SettingsGroupListViewItem.cpp src/Conversation/Utils/src/AttachmentHandler.cpp src/Common/AppControl/src/FileViewer.cpp src/Common/MsgEngine/src/private/MsgUtilsPrivate.cpp src/MsgThread/Controller/src/ThreadSearchList.cpp src/Common/MsgEngine/src/private/MsgPagePrivate.cpp src/Common/MsgEngine/src/private/MsgThreadItemPrivate.cpp src/Viewer/View/src/SmilAudioItemView.cpp src/Common/Controller/src/SaveAttachmentsPopup.cpp src/Common/AppControl/src/AppControlParser.cpp src/Common/MsgEngine/src/MsgSettings.cpp src/Common/MsgEngine/src/MsgUtils.cpp src/Viewer/Controller/src/SmilPlayer.cpp src/Common/Controller/src/ViewItemController.cpp src/MsgThread/Controller/src/ThreadList.cpp src/Common/MsgEngine/src/MsgConversationItem.cpp src/MsgThread/Controller/src/BaseThreadListItem.cpp src/Conversation/Body/View/src/VideoPageViewItem.cpp src/Common/MsgEngine/src/MessageSMS.cpp src/Conversation/Body/Controller/src/PopupBodyAttachmentListItem.cpp src/Conversation/ConvList/View/src/BubbleView.cpp src/MsgThread/Controller/src/ThreadListItem.cpp src/Common/MsgEngine/src/private/MsgAddressPrivate.cpp src/Common/View/src/Scroller.cpp src/Viewer/View/src/SmilPageLayout.cpp src/Common/Controller/src/FrameController.cpp src/Common/Controller/src/NaviFrameController.cpp src/Common/AppControl/src/AppControlUtils.cpp src/Common/View/src/DefaultLayout.cpp src/Conversation/ContactList/Controller/src/ContactListItem.cpp src/Common/MsgEngine/src/private/MsgSettingsPrivate.cpp src/Common/MsgEngine/src/MsgStorage.cpp src/Common/Utils/src/FileUtils.cpp src/Common/Utils/src/LoggerImpl.cpp src/Conversation/ConvList/Controller/src/DateLineItem.cpp src/Common/View/src/PopupListItem.cpp src/Common/View/src/View.cpp src/Common/Utils/src/TextDecorator.cpp src/MainApp/main.cpp src/Common/Utils/src/PathUtils.cpp src/Conversation/Body/View/src/BodyViewItem.cpp src/Common/MsgEngine/src/private/MsgTransportPrivate.cpp src/Common/Controller/src/BaseController.cpp src/Common/Controller/src/App.cpp src/Viewer/View/src/SmilVideoItemView.cpp src/MsgThread/View/src/ThreadListViewItem.cpp src/Common/AppControl/src/ContactEditor.cpp src/Conversation/ConvList/View/src/ConvListLayout.cpp src/Common/MsgEngine/src/private/MsgConvMediaPrivate.cpp src/Common/Utils/src/MediaUtils.cpp src/Conversation/Recipients/Controller/src/ConvRecipientsPanel.cpp src/Conversation/ConvList/View/src/ConvSelectAll.cpp src/Common/View/src/Popup.cpp src/Common/MsgEngine/src/private/MsgStoragePrivate.cpp src/Common/MsgEngine/src/Message.cpp src/Common/View/src/ListItem.cpp src/Common/Utils/src/TimeUtils.cpp src/Viewer/Utils/src/MediaPlayer.cpp src/Conversation/Body/Controller/src/Body.cpp src/Settings/View/src/SettingsListViewItem.cpp src/Common/MsgEngine/src/MsgEngine.cpp src/Conversation/ContactList/View/src/ConvContactListView.cpp src/Conversation/AppControl/src/ContactPicker.cpp src/MsgThread/View/src/FloatingButton.cpp src/MsgThread/View/src/MsgThreadSearchPanel.cpp src/Settings/Controller/src/SettingsSound.cpp src/Settings/View/src/SimMsgLayout.cpp src/Common/AppControl/src/FileShare.cpp src/Common/MsgEngine/src/private/MsgMediaPrivate.cpp src/Common/AppControl/src/AppControlDefault.cpp src/Viewer/View/src/SmilTextItemView.cpp src/Common/ContactManager/src/ContactManager.cpp src/Common/View/src/NaviFrameView.cpp src/Common/MsgEngine/src/private/MessageMmsPrivate.cpp src/Conversation/ConvList/Controller/src/ConvList.cpp src/Conversation/Body/View/src/PageViewItem.cpp src/Common/Controller/src/ViewController.cpp src/Conversation/Main/Controller/src/Conversation.cpp src/Common/SystemSettingsManager/src/SystemSettingsManager.cpp src/Common/ContactManager/src/ContactRecord.cpp src/MsgThread/View/src/MsgThreadLayout.cpp src/Common/View/src/NaviFrameItem.cpp src/Common/MsgEngine/src/MessageMms.cpp src/Common/AppControl/src/VoiceCall.cpp src/Conversation/Utils/src/MessageDetailContent.cpp src/Viewer/View/src/SmilPlayerView.cpp # EDC Sources USER_EDCS = # PO Sources -USER_POS = res/po/az.po res/po/fr.po res/po/cs.po res/po/en.po res/po/zh_HK.po res/po/ja_JP.po res/po/zh_CN.po res/po/zh_TW.po res/po/en_US.po res/po/gl.po res/po/ga.po res/po/ro.po res/po/en_PH.po res/po/hr.po res/po/da.po res/po/es_ES.po res/po/ka.po res/po/nb.po res/po/ar.po res/po/eu.po res/po/sl.po res/po/sv.po res/po/hy.po res/po/pt_PT.po res/po/fi.po res/po/uk.po res/po/hu.po res/po/et.po res/po/nl.po res/po/lv.po res/po/tr_TR.po res/po/fr_CA.po res/po/kk.po res/po/ru_RU.po res/po/it_IT.po res/po/es_US.po res/po/ca.po res/po/sk.po res/po/uz.po res/po/pt_BR.po res/po/bg.po res/po/ko_KR.po res/po/hi.po res/po/pl.po res/po/lt.po res/po/de.po res/po/el_GR.po res/po/sr.po res/po/mk.po res/po/is.po +USER_POS = res/po/az.po res/po/fr.po res/po/cs.po res/po/en.po res/po/zh_HK.po res/po/ja_JP.po res/po/zh_CN.po res/po/zh_TW.po res/po/en_US.po res/po/gl.po res/po/ro.po res/po/ga.po res/po/en_PH.po res/po/hr.po res/po/da.po res/po/es_ES.po res/po/ka.po res/po/nb.po res/po/ar.po res/po/eu.po res/po/sl.po res/po/sv.po res/po/hy.po res/po/pt_PT.po res/po/fi.po res/po/uk.po res/po/hu.po res/po/et.po res/po/nl.po res/po/lv.po res/po/tr_TR.po res/po/fr_CA.po res/po/kk.po res/po/ru_RU.po res/po/it_IT.po res/po/es_US.po res/po/ca.po res/po/sk.po res/po/uz.po res/po/pt_BR.po res/po/bg.po res/po/ko_KR.po res/po/hi.po res/po/pl.po res/po/lt.po res/po/de.po res/po/el_GR.po res/po/sr.po res/po/mk.po res/po/is.po # User Defines USER_DEFS = @@ -41,7 +40,7 @@ USER_INC_FILES = USER_INC_FILES_ABS = ## C++ Compiler USER_CPP_INC_DIRS = src/Conversation/Utils/inc src/Common/SystemSettingsManager/inc inc src/Conversation/AppControl/inc src/Conversation/ConvList/Controller/inc src/Conversation/ConvList/View/inc src/Conversation/Main/Controller/inc src/Conversation/Main/View/inc src/Conversation/Recipients/Controller/inc src/Conversation/Recipients/View/inc src/Common/ContactManager/inc src/Common/AppControl/inc src/Conversation/Body/Controller/inc src/Conversation/ContactList/Controller/inc src/Conversation/ContactList/View/inc src/Conversation/Body/View/inc src/Settings/Controller/inc src/Settings/View/inc src/Viewer/Controller/inc src/Viewer/View/inc src/Viewer/Utils/inc src/MsgThread/Controller/inc src/MsgThread/View/inc src/Common/MsgEngine/inc src/Common/Utils/inc src/Common/View/inc src/Common/Controller/inc -USER_CPP_INC_DIRS_ABS = /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/libxml2 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/appcore-agent /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/appfw /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/attach-panel /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/badge /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/base /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/cairo /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/calendar-service2 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ckm /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/contacts-svc /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/content /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/context-service /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/csf /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/dali /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/dali-toolkit /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/dbus-1.0 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/device /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/dlog /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-buffer-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-con-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-evas-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-file-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-imf-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-imf-evas-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-input-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-input-evas-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-ipc-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ector-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/e_dbus-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/edje-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/eet-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/efl-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/efl-extension /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/efreet-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/eina-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/eina-1/eina /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/eio-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/eldbus-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/elementary-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/embryo-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/emile-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/eo-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/eom /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ethumb-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ethumb-client-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/evas-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/feedback /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/fontconfig /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/freetype2 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/geofence /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/gio-unix-2.0 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/glib-2.0 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/harfbuzz /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/iotcon /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/json-glib-1.0 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/location /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/maps /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/media /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/media-content /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/messaging /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/metadata-editor /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/minicontrol /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/minizip /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/network /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/notification /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/phonenumber-utils /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/sensor /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/service-adaptor /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/shortcut /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/storage /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/system /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/telephony /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/telephony-client /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ug-1 /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ui /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/vconf /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/web /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/widget_service /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/widget_viewer_evas /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/wifi-direct /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/lib/dbus-1.0/include /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/lib/glib-2.0/include /home/dmdragan/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/msg-service +USER_CPP_INC_DIRS_ABS = /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/libxml2 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/appcore-agent /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/appfw /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/attach-panel /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/badge /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/base /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/cairo /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/calendar-service2 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ckm /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/contacts-svc /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/content /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/context-service /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/csf /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/dali /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/dali-toolkit /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/dbus-1.0 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/device /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/dlog /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-buffer-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-con-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-evas-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-file-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-imf-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-imf-evas-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-input-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-input-evas-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ecore-ipc-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ector-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/e_dbus-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/edje-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/eet-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/efl-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/efl-extension /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/efreet-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/eina-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/eina-1/eina /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/eio-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/eldbus-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/elementary-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/embryo-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/emile-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/eo-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/eom /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ethumb-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ethumb-client-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/evas-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/feedback /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/fontconfig /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/freetype2 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/geofence /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/gio-unix-2.0 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/glib-2.0 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/harfbuzz /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/iotcon /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/json-glib-1.0 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/location /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/maps /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/media /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/media-content /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/messaging /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/metadata-editor /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/minicontrol /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/minizip /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/network /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/notification /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/phonenumber-utils /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/sensor /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/service-adaptor /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/shortcut /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/storage /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/system /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/telephony /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/telephony-client /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ug-1 /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/ui /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/vconf /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/web /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/widget_service /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/widget_viewer_evas /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/wifi-direct /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/lib/dbus-1.0/include /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/lib/glib-2.0/include /home/denis/tizen-sdk-3.0/tools/smart-build-interface/../../platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core.private/usr/include/msg-service USER_CPP_INC_FILES = USER_CPP_INC_FILES_ABS = diff --git a/src/Common/AppControl/inc/ContactViewer.h b/src/Common/AppControl/inc/ContactViewer.h index 90a7c99..4148bb0 100644 --- a/src/Common/AppControl/inc/ContactViewer.h +++ b/src/Common/AppControl/inc/ContactViewer.h @@ -19,6 +19,7 @@ #define ContactViewer_h_ #include "AppControlUtils.h" +#include "ContactAddress.h" namespace Msg { @@ -27,19 +28,26 @@ namespace Msg */ class ContactViewer { - public: - ContactViewer(); + public: + /** + * Launches view-operation. + * @param id Contact person id or MyProfile id + * @param ownerType PersonType or MyProfileType + * @return true in case of success, otherwise returns false. + */ + static bool launch(int id, ContactAddress::OwnerType ownerType); - /** - * Launches view-operation. - * @param personId Contact person id - * @return true in case of success, otherwise returns false. - */ - static bool launch(int personId); + /** + * Launches view-operation. + * @param address reference to ContactAddress object. + * @return true in case of success, otherwise returns false. + */ + static bool launch(const ContactAddress &address); - private: - ContactViewer(const ContactViewer&) = delete; - ContactViewer& operator=(const ContactViewer&) = delete; + private: + ContactViewer(const ContactViewer&) = delete; + ContactViewer& operator=(const ContactViewer&) = delete; + static const char *toStr(ContactAddress::OwnerType type); }; } diff --git a/src/Common/AppControl/src/ContactViewer.cpp b/src/Common/AppControl/src/ContactViewer.cpp index f1ae45c..bc262fd 100644 --- a/src/Common/AppControl/src/ContactViewer.cpp +++ b/src/Common/AppControl/src/ContactViewer.cpp @@ -25,14 +25,12 @@ using namespace Msg; namespace { - const char* mimeContact = "application/vnd.tizen.contact"; + const char *mimeContact = "application/vnd.tizen.contact"; + const char *personContactTypeStr = "person"; + const char *myProfileTypeStr = "my_profile"; } -ContactViewer::ContactViewer() -{ -} - -bool ContactViewer::launch(int personId) +bool ContactViewer::launch(int id, ContactAddress::OwnerType ownerType) { bool res = false; app_control_h svc_handle = nullptr; @@ -41,7 +39,8 @@ bool ContactViewer::launch(int personId) { app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_VIEW); app_control_set_mime(svc_handle, mimeContact); - app_control_add_extra_data(svc_handle, APP_CONTROL_DATA_ID, std::to_string(personId).c_str()); + app_control_add_extra_data(svc_handle, APP_CONTROL_DATA_TYPE, toStr(ownerType)); + app_control_add_extra_data(svc_handle, APP_CONTROL_DATA_ID, std::to_string(id).c_str()); app_control_set_launch_mode(svc_handle, APP_CONTROL_LAUNCH_MODE_GROUP); int ret = app_control_send_launch_request(svc_handle, nullptr, nullptr); MSG_LOG("Result code: ", ret); @@ -52,3 +51,22 @@ bool ContactViewer::launch(int personId) return res; } +bool ContactViewer::launch(const ContactAddress &address) +{ + return launch(address.getOwnerId(), address.getOwnerType()); +} + +const char *ContactViewer::toStr(ContactAddress::OwnerType type) +{ + switch(type) + { + case ContactAddress::PersonType: + return personContactTypeStr; + case ContactAddress::MyProfileType: + return myProfileTypeStr; + default: + MSG_LOG_ERROR("Unknown ContactType"); + }; + return ""; +} + diff --git a/src/Common/ContactManager/inc/ContactPersonAddress.h b/src/Common/ContactManager/inc/ContactAddress.h similarity index 55% rename from src/Common/ContactManager/inc/ContactPersonAddress.h rename to src/Common/ContactManager/inc/ContactAddress.h index 6e43d70..f678adc 100644 --- a/src/Common/ContactManager/inc/ContactPersonAddress.h +++ b/src/Common/ContactManager/inc/ContactAddress.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2016 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. @@ -14,40 +14,41 @@ * limitations under the License. */ -#ifndef __ContactPersonAddress_h__ -#define __ContactPersonAddress_h__ +#ifndef __ContactAddress_h__ +#define __ContactAddress_h__ -#include "ContactRecord.h" +#include "MsgUtils.h" namespace Msg { - class ContactPersonAddress; - typedef std::shared_ptr ContactPersonAddressRef; + class ContactAddress; + typedef std::shared_ptr ContactAddressRef; - class ContactPersonAddress - : public ContactRecord + class ContactAddress { public: enum AddressType { EmailType, - NumberType, + NumberType }; - public: - ContactPersonAddress(bool release, contacts_record_h record = nullptr); + enum OwnerType + { + PersonType, + MyProfileType + }; + public: + virtual ~ContactAddress() {}; virtual AddressType getAddressType() const = 0; - virtual int getPersonId() const = 0; + virtual OwnerType getOwnerType() const = 0; + virtual int getOwnerId() const = 0; virtual std::string getDispName() const = 0; - virtual std::string getAddress() const = 0; + virtual std::string getAddress() const = 0; // Email or Number virtual std::string getThumbnailPath() const = 0; }; - inline ContactPersonAddress::ContactPersonAddress(bool release, contacts_record_h record) - : ContactRecord(release, record) - { - } } -#endif /* __ContactPersonAddress_h__ */ +#endif /* __ContactAddress_h__ */ diff --git a/src/Common/ContactManager/inc/ContactManager.h b/src/Common/ContactManager/inc/ContactManager.h index ca8564c..a8c9d96 100644 --- a/src/Common/ContactManager/inc/ContactManager.h +++ b/src/Common/ContactManager/inc/ContactManager.h @@ -28,7 +28,9 @@ #include "ContactPersonPhoneLog.h" #include "ContactPersonNumber.h" #include "ContactPersonEmail.h" -#include "ContactOwnerProfile.h" +#include "ContactMyProfile.h" +#include "ContactMyProfileNumber.h" +#include "ContactMyProfileEmail.h" namespace Msg { @@ -63,11 +65,11 @@ namespace Msg std::shared_ptr> search(const std::string &keyword); /** - *@brief Search by email and phone and return ContactPersonAddress record + *@brief Search by email and phone and return ContactAddress record *@param[in] address - email or number - *@return Reference to ContactPersonAddress + *@return Reference to ContactAddress */ - ContactPersonAddressRef getContactPersonAddress(const std::string &address); + ContactAddressRef getContactAddress(const std::string &address); /** *@brief Search for contacts-id, name, phone-number and thumbnail path based on phone-number id @@ -77,10 +79,31 @@ namespace Msg ContactPersonNumberRef getContactPersonNumber(int phoneId); /** + *@brief Search by email address ContactPersonEmail record + *@param[in] email - email address + *@return Reference to ContactPersonEmail + */ + ContactPersonEmailRef getContactPersonEmail(const std::string &email); + + /** + *@brief Search by number address ContactMyProfileNumber record + *@param[in] number - phone number + *@return Reference to ContactMyProfileNumber + */ + ContactMyProfileNumberRef getContactMyProfileNumber(const std::string &number); + + /** + *@brief Search by email address ContactMyProfileEmailRef record + *@param[in] email - email address + *@return Reference to ContactMyProfileEmailR + */ + ContactMyProfileEmailRef getContactMyProfileEmail(const std::string &email); + + /** *@brief Return owner's ContactPersonAddress record *@return Reference to ContactPersonAddress */ - ContactOwnerProfileRef getOwnerProfile(); + ContactMyProfileRef getOwnerProfile(); /** *@brief Add listener on contacts database @@ -110,7 +133,7 @@ namespace Msg std::string makeVcard(const std::list &idList); private: - typedef std::unordered_map AddressMap; + typedef std::unordered_map AddressMap; private: /** @@ -136,15 +159,9 @@ namespace Msg */ ContactPersonNumberRef getContactPersonNumber(const std::string &number); - /** - *@brief Search by email address ContactPersonEmail record - *@param[in] email - email address - *@return Reference to ContactPersonEmail - */ - ContactPersonEmailRef getContactPersonEmail(const std::string &email); void invalidateCache(); - ContactPersonAddressRef getAddress(const std::string &address); + ContactAddressRef getAddress(const std::string &address); std::string createContactContent(contacts_record_h record, bool myProfile); std::string createContentForContactList(int personId); @@ -152,7 +169,7 @@ namespace Msg private: std::list m_Listeners; AddressMap m_AddressMap; - ContactOwnerProfileRef m_OwnerProfile; + ContactMyProfileRef m_OwnerProfile; }; class IContactManagerListener diff --git a/src/Common/ContactManager/inc/ContactOwnerProfile.h b/src/Common/ContactManager/inc/ContactMyProfile.h similarity index 63% rename from src/Common/ContactManager/inc/ContactOwnerProfile.h rename to src/Common/ContactManager/inc/ContactMyProfile.h index ce4ee57..f8e6f98 100644 --- a/src/Common/ContactManager/inc/ContactOwnerProfile.h +++ b/src/Common/ContactManager/inc/ContactMyProfile.h @@ -14,46 +14,45 @@ * limitations under the License. */ -#ifndef ContactOwnerProfile_H_ -#define ContactOwnerProfile_H_ +#ifndef ContactMyProfile_h_ +#define ContactMyProfile_h_ #include "ContactRecord.h" namespace Msg { - class ContactOwnerProfile; - typedef std::shared_ptr ContactOwnerProfileRef; + class ContactMyProfile; + typedef std::shared_ptr ContactMyProfileRef; - class ContactOwnerProfile + class ContactMyProfile : public ContactRecord { public: - ContactOwnerProfile(bool release, contacts_record_h record = nullptr); - - virtual int getId() const; + ContactMyProfile(bool release, contacts_record_h record = nullptr); + int getId() const; std::string getThumbnailPath() const; std::string getDispName() const; }; - inline ContactOwnerProfile::ContactOwnerProfile(bool release, contacts_record_h record) + inline ContactMyProfile::ContactMyProfile(bool release, contacts_record_h record) : ContactRecord(release, record) { } - inline int ContactOwnerProfile::getId() const + inline int ContactMyProfile::getId() const { return getInt(_contacts_my_profile.id); } - inline std::string ContactOwnerProfile::getThumbnailPath() const + inline std::string ContactMyProfile::getThumbnailPath() const { return getStr(_contacts_my_profile.image_thumbnail_path); } - inline std::string ContactOwnerProfile::getDispName() const + inline std::string ContactMyProfile::getDispName() const { return getStr(_contacts_my_profile.display_name); } } -#endif /* ContactOwnerProfile_H_ */ +#endif /* ContactMyProfile_h_ */ diff --git a/src/Common/ContactManager/inc/ContactMyProfileEmail.h b/src/Common/ContactManager/inc/ContactMyProfileEmail.h new file mode 100644 index 0000000..bb51300 --- /dev/null +++ b/src/Common/ContactManager/inc/ContactMyProfileEmail.h @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2009-2015 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 __ContactMyProfileEmail_h__ +#define __ContactMyProfileEmail_h__ + +#include "ContactAddress.h" +#include "ContactRecord.h" +#include "ContactMyProfile.h" + +namespace Msg +{ + class ContactMyProfileEmail; + typedef std::shared_ptr ContactMyProfileEmailRef; + + class ContactMyProfileEmail + : public ContactAddress + , public ContactRecord + { + public: + ContactMyProfileEmail(bool release, const ContactMyProfile &myProfile, contacts_record_h record = nullptr); + static const char *getUri(); + int getId() const; + + // ContactAddress: + virtual AddressType getAddressType() const; + virtual OwnerType getOwnerType() const; + virtual int getOwnerId() const; + virtual std::string getDispName() const; + virtual std::string getAddress() const; + virtual std::string getThumbnailPath() const; + + private: + int m_MyProfileId; + std::string m_ThumbnailPath; + std::string m_DispName; + }; + + inline ContactMyProfileEmail::ContactMyProfileEmail(bool release, const ContactMyProfile &myProfile, contacts_record_h record) + : ContactRecord(release, record) + , m_MyProfileId(myProfile.getId()) + , m_ThumbnailPath(myProfile.getThumbnailPath()) + , m_DispName(myProfile.getDispName()) + { + } + + inline int ContactMyProfileEmail::getId() const + { + return getInt(_contacts_email.id); + } + + inline int ContactMyProfileEmail::getOwnerId() const + { + return m_MyProfileId; + } + + inline std::string ContactMyProfileEmail::getDispName() const + { + return m_DispName; + } + + inline std::string ContactMyProfileEmail::getAddress() const + { + return getStr(_contacts_email.email); + } + + inline std::string ContactMyProfileEmail::getThumbnailPath() const + { + return m_ThumbnailPath; + } + + inline const char *ContactMyProfileEmail::getUri() + { + return _contacts_email._uri; + } + + inline ContactMyProfileNumber::OwnerType ContactMyProfileEmail::getOwnerType() const + { + return MyProfileType; + } + + inline ContactMyProfileNumber::AddressType ContactMyProfileEmail::getAddressType() const + { + return EmailType; + } +} + + +#endif /* __ContactMyProfileEmail_h__ */ diff --git a/src/Common/ContactManager/inc/ContactMyProfileNumber.h b/src/Common/ContactManager/inc/ContactMyProfileNumber.h new file mode 100644 index 0000000..743cc8e --- /dev/null +++ b/src/Common/ContactManager/inc/ContactMyProfileNumber.h @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2009-2015 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 __ContactMyProfileNumber_h__ +#define __ContactMyProfileNumber_h__ + +#include "ContactAddress.h" +#include "ContactRecord.h" +#include "ContactMyProfile.h" + +namespace Msg +{ + class ContactMyProfileNumber; + typedef std::shared_ptr ContactMyProfileNumberRef; + + class ContactMyProfileNumber + : public ContactAddress + , public ContactRecord + { + public: + ContactMyProfileNumber(bool release, const ContactMyProfile &myProfile, contacts_record_h record = nullptr); + static const char *getUri(); + int getId() const; + + // ContactAddress: + virtual AddressType getAddressType() const; + virtual OwnerType getOwnerType() const; + virtual int getOwnerId() const; + virtual std::string getDispName() const; + virtual std::string getAddress() const; + virtual std::string getThumbnailPath() const; + + private: + int m_MyProfileId; + std::string m_ThumbnailPath; + std::string m_DispName; + }; + + inline ContactMyProfileNumber::ContactMyProfileNumber(bool release, const ContactMyProfile &myProfile, contacts_record_h record) + : ContactRecord(release, record) + , m_MyProfileId(myProfile.getId()) + , m_ThumbnailPath(myProfile.getThumbnailPath()) + , m_DispName(myProfile.getDispName()) + { + } + + inline int ContactMyProfileNumber::getId() const + { + return getInt(_contacts_number.id); + } + + inline int ContactMyProfileNumber::getOwnerId() const + { + return m_MyProfileId; + } + + inline std::string ContactMyProfileNumber::getDispName() const + { + return m_DispName; + } + + inline std::string ContactMyProfileNumber::getAddress() const + { + return getStr(_contacts_number.number); + } + + inline std::string ContactMyProfileNumber::getThumbnailPath() const + { + return m_ThumbnailPath; + } + + inline const char *ContactMyProfileNumber::getUri() + { + return _contacts_number._uri; + } + + inline ContactMyProfileNumber::OwnerType ContactMyProfileNumber::getOwnerType() const + { + return MyProfileType; + } + + inline ContactMyProfileNumber::AddressType ContactMyProfileNumber::getAddressType() const + { + return NumberType; + } +} + + +#endif /* __ContactMyProfileNumber_h__ */ diff --git a/src/Common/ContactManager/inc/ContactPersonEmail.h b/src/Common/ContactManager/inc/ContactPersonEmail.h index f005a5e..36b8385 100644 --- a/src/Common/ContactManager/inc/ContactPersonEmail.h +++ b/src/Common/ContactManager/inc/ContactPersonEmail.h @@ -17,7 +17,8 @@ #ifndef __ContactPersonEmail_h__ #define __ContactPersonEmail_h__ -#include "ContactPersonAddress.h" +#include "ContactAddress.h" +#include "ContactRecord.h" namespace Msg { @@ -25,30 +26,34 @@ namespace Msg typedef std::shared_ptr ContactPersonEmailRef; class ContactPersonEmail - : public ContactPersonAddress + : public ContactAddress + , public ContactRecord { public: ContactPersonEmail(bool release, contacts_record_h record = nullptr); static const char *getUri(); - virtual int getId() const; + int getEmailId() const; + + // ContactAddress: + virtual OwnerType getOwnerType() const; virtual AddressType getAddressType() const; - virtual int getPersonId() const; + virtual int getOwnerId() const; virtual std::string getDispName() const; virtual std::string getAddress() const; virtual std::string getThumbnailPath() const; }; inline ContactPersonEmail::ContactPersonEmail(bool release, contacts_record_h record) - : ContactPersonAddress(release, record) + : ContactRecord(release, record) { } - inline int ContactPersonEmail::getId() const + inline int ContactPersonEmail::getEmailId() const { return getInt(_contacts_person_email.email_id); } - inline int ContactPersonEmail::getPersonId() const + inline int ContactPersonEmail::getOwnerId() const { return getInt(_contacts_person_email.person_id); } @@ -73,6 +78,11 @@ namespace Msg return _contacts_person_email._uri; } + inline ContactPersonEmail::OwnerType ContactPersonEmail::getOwnerType() const + { + return PersonType; + } + inline ContactPersonEmail::AddressType ContactPersonEmail::getAddressType() const { return EmailType; diff --git a/src/Common/ContactManager/inc/ContactPersonNumber.h b/src/Common/ContactManager/inc/ContactPersonNumber.h index a878424..800f551 100644 --- a/src/Common/ContactManager/inc/ContactPersonNumber.h +++ b/src/Common/ContactManager/inc/ContactPersonNumber.h @@ -17,7 +17,8 @@ #ifndef __ContactPersonNumber_h__ #define __ContactPersonNumber_h__ -#include "ContactPersonAddress.h" +#include "ContactAddress.h" +#include "ContactRecord.h" namespace Msg { @@ -25,30 +26,34 @@ namespace Msg typedef std::shared_ptr ContactPersonNumberRef; class ContactPersonNumber - : public ContactPersonAddress + : public ContactAddress + , public ContactRecord { public: ContactPersonNumber(bool release, contacts_record_h record = nullptr); static const char *getUri(); - virtual int getId() const; + int getNumberId() const; + + // ContactAddress: + virtual OwnerType getOwnerType() const; virtual AddressType getAddressType() const; - virtual int getPersonId() const; + virtual int getOwnerId() const; virtual std::string getDispName() const; virtual std::string getAddress() const; virtual std::string getThumbnailPath() const; }; inline ContactPersonNumber::ContactPersonNumber(bool release, contacts_record_h record) - : ContactPersonAddress(release, record) + : ContactRecord(release, record) { } - inline int ContactPersonNumber::getId() const + inline int ContactPersonNumber::getNumberId() const { return getInt(_contacts_person_number.number_id); } - inline int ContactPersonNumber::getPersonId() const + inline int ContactPersonNumber::getOwnerId() const { return getInt(_contacts_person_number.person_id); } @@ -73,6 +78,11 @@ namespace Msg return _contacts_person_number._uri; } + inline ContactPersonNumber::OwnerType ContactPersonNumber::getOwnerType() const + { + return PersonType; + } + inline ContactPersonNumber::AddressType ContactPersonNumber::getAddressType() const { return NumberType; diff --git a/src/Common/ContactManager/inc/ContactRecord.h b/src/Common/ContactManager/inc/ContactRecord.h index 565d63c..fe95823 100644 --- a/src/Common/ContactManager/inc/ContactRecord.h +++ b/src/Common/ContactManager/inc/ContactRecord.h @@ -34,8 +34,8 @@ namespace Msg ContactRecord(ContactRecord&) = delete; ContactRecord& operator=(ContactRecord&) = delete; - virtual int getId() const = 0; void set(contacts_record_h record); + contacts_record_h getRecord() const; protected: std::string getStr(unsigned propertyId) const; @@ -65,6 +65,11 @@ namespace Msg return val; } + inline contacts_record_h ContactRecord::getRecord() const + { + return m_Record; + } + } #endif /* __ContactRecord_h__ */ diff --git a/src/Common/ContactManager/src/ContactManager.cpp b/src/Common/ContactManager/src/ContactManager.cpp index a2dab74..31d4a37 100644 --- a/src/Common/ContactManager/src/ContactManager.cpp +++ b/src/Common/ContactManager/src/ContactManager.cpp @@ -17,8 +17,10 @@ #include "ContactManager.h" #include "Logger.h" #include "MsgUtils.h" +#include "PhoneNumberUtils.h" #include +#include namespace Msg { @@ -86,7 +88,6 @@ return "Unknown error"; } - template <> std::shared_ptr> ContactManager::search(const std::string &keyword) { @@ -157,17 +158,87 @@ ContactPersonEmailRef ContactManager::getContactPersonEmail(const std::string &email) { contacts_filter_h filter = nullptr; - contacts_filter_create(_contacts_contact_email._uri, &filter); - contacts_filter_add_str(filter, _contacts_contact_email.email, CONTACTS_MATCH_EXACTLY, email.c_str()); + contacts_filter_create(_contacts_person_email._uri, &filter); + contacts_filter_add_str(filter, _contacts_person_email.email, CONTACTS_MATCH_EXACTLY, email.c_str()); return filter ? getContactPersonEmail(filter) : nullptr; } - ContactPersonAddressRef ContactManager::getContactPersonAddress(const std::string &address) + ContactMyProfileNumberRef ContactManager::getContactMyProfileNumber(const std::string &number) + { + auto myProfile = getOwnerProfile(); + if(!myProfile) + return nullptr; + + contacts_record_h rec = myProfile->getRecord(); + + int count = 0; + contacts_record_get_child_record_count(rec, _contacts_my_profile.number, &count); + std::string normalizedNumber = PhoneNumberUtils::getInst().getNormalizedNumber(number); + + for(int i =0; i < count; ++i) + { + contacts_record_h child = nullptr; + contacts_record_get_child_record_at_p(rec, _contacts_my_profile.number, i, &child); + if(child) + { + char *num = nullptr; + contacts_record_get_str_p(child, _contacts_number.number, &num); + if(num) + { + std::string curNum = PhoneNumberUtils::getInst().getNormalizedNumber(num); + if(normalizedNumber == curNum) + { + contacts_record_h clonedRec = nullptr; + contacts_record_clone(child, &clonedRec); + if(clonedRec) + return std::make_shared(true, *myProfile, clonedRec); + } + } + } + } + return nullptr; + } + + ContactMyProfileEmailRef ContactManager::getContactMyProfileEmail(const std::string &email) + { + auto myProfile = getOwnerProfile(); + if(!myProfile) + return nullptr; + + contacts_record_h rec = myProfile->getRecord(); + + int count = 0; + contacts_record_get_child_record_count(rec, _contacts_my_profile.email, &count); + + for(int i =0; i < count; ++i) + { + contacts_record_h child = nullptr; + contacts_record_get_child_record_at_p(rec, _contacts_my_profile.email, i, &child); + if(child) + { + char *curEmail = nullptr; + contacts_record_get_str_p(child, _contacts_email.email, &curEmail); + if(curEmail) + { + if(strcasecmp(email.c_str(), curEmail) == 0) + { + contacts_record_h clonedRec = nullptr; + contacts_record_clone(child, &clonedRec); + if(clonedRec) + return std::make_shared(true, *myProfile, clonedRec); + } + } + } + } + return nullptr; + } + + ContactAddressRef ContactManager::getContactAddress(const std::string &address) { return getAddress(address); } - ContactOwnerProfileRef ContactManager::getOwnerProfile() + ContactMyProfileRef ContactManager::getOwnerProfile() { if(!m_OwnerProfile) { @@ -180,7 +251,7 @@ contacts_list_destroy(list, false); } if(myProfile) - m_OwnerProfile.reset(new ContactOwnerProfile(true, myProfile)); + m_OwnerProfile.reset(new ContactMyProfile(true, myProfile)); } return m_OwnerProfile; } @@ -313,17 +384,32 @@ return cResValue ? std::make_shared(true, cResValue) : nullptr; } - ContactPersonAddressRef ContactManager::getAddress(const std::string &address) + ContactAddressRef ContactManager::getAddress(const std::string &address) { auto it = m_AddressMap.find(address); if(m_AddressMap.end() == it) { - ContactPersonAddressRef personAddress = MsgUtils::isValidNumber(address) ? - std::static_pointer_cast(getContactPersonNumber(address)): - std::static_pointer_cast(getContactPersonEmail(address)); - m_AddressMap[address] = personAddress; + bool isNumber = MsgUtils::isValidNumber(address); + + // ContactPerson: + ContactAddressRef contactAddress; + if(isNumber) + contactAddress = getContactPersonNumber(address); + else + contactAddress = getContactPersonEmail(address); + + // MyProfile: + if(!contactAddress) + { + if(isNumber) + contactAddress = getContactMyProfileNumber(address); + else + contactAddress = getContactMyProfileEmail(address); + } + + m_AddressMap[address] = contactAddress; - return personAddress; + return contactAddress; } return it->second; } diff --git a/src/Common/Controller/src/FrameController.cpp b/src/Common/Controller/src/FrameController.cpp index 14f54ed..f8dd092 100644 --- a/src/Common/Controller/src/FrameController.cpp +++ b/src/Common/Controller/src/FrameController.cpp @@ -50,7 +50,7 @@ void FrameController::setNaviBarTitle(const MsgAddressList &addressList) if(!addressList.isEmpty()) { std::string firstAddress = addressList[0].getAddress(); - ContactPersonAddressRef contactPersonAddress = getApp().getContactManager().getContactPersonAddress(firstAddress); + ContactAddressRef contactPersonAddress = getApp().getContactManager().getContactAddress(firstAddress); if(contactPersonAddress) title = contactPersonAddress->getDispName(); diff --git a/src/Common/Controller/src/MbeRecipients.cpp b/src/Common/Controller/src/MbeRecipients.cpp index 94013cf..a0fd12f 100644 --- a/src/Common/Controller/src/MbeRecipients.cpp +++ b/src/Common/Controller/src/MbeRecipients.cpp @@ -37,7 +37,7 @@ MbeRecipients::~MbeRecipients() std::string MbeRecipients::getDispName(const std::string &address) const { std::string dispName; - ContactPersonAddressRef contactAddress = m_App.getContactManager().getContactPersonAddress(address); + ContactAddressRef contactAddress = m_App.getContactManager().getContactAddress(address); if(contactAddress) dispName = contactAddress->getDispName(); if(dispName.empty()) diff --git a/src/Common/MsgEngine/inc/MsgUtils.h b/src/Common/MsgEngine/inc/MsgUtils.h index 2658541..6a8f985 100644 --- a/src/Common/MsgEngine/inc/MsgUtils.h +++ b/src/Common/MsgEngine/inc/MsgUtils.h @@ -42,6 +42,7 @@ namespace Msg static bool isValidEmail(const std::string &address); static MsgAddress::AddressType getAddressType(const std::string &address); static std::string makeNormalizedNumber(const std::string &number); + static std::string makeCleanedNumber(const std::string &number); static bool isMms(Message::Type type); static bool isSms(Message::Type type); }; diff --git a/src/Common/MsgEngine/src/MsgUtils.cpp b/src/Common/MsgEngine/src/MsgUtils.cpp index 758a918..03ebd06 100644 --- a/src/Common/MsgEngine/src/MsgUtils.cpp +++ b/src/Common/MsgEngine/src/MsgUtils.cpp @@ -108,6 +108,17 @@ std::string MsgUtils::makeNormalizedNumber(const std::string &number) return normalizedNumber; } +std::string MsgUtils::makeCleanedNumber(const std::string &number) +{ + std::string cleanedNumber; + for(auto symbol : number) + { + if(isdigit(symbol)) + cleanedNumber += symbol; + } + return cleanedNumber; +} + bool MsgUtils::isMms(Message::Type type) { switch(type) diff --git a/src/Common/Utils/inc/PhoneNumberUtils.h b/src/Common/Utils/inc/PhoneNumberUtils.h new file mode 100644 index 0000000..6e38352 --- /dev/null +++ b/src/Common/Utils/inc/PhoneNumberUtils.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2009-2016 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 __PhoneNumberUtils_H__ +#define __PhoneNumberUtils_H__ + +#include + +namespace Msg +{ + class PhoneNumberUtils + { + public: + static PhoneNumberUtils &getInst(); + std::string getNormalizedNumber(const std::string &number) const; + + private: + PhoneNumberUtils(); + ~PhoneNumberUtils(); + PhoneNumberUtils& operator=(PhoneNumberUtils&) = delete; + PhoneNumberUtils(PhoneNumberUtils&) = delete; + + }; +} + +#endif /* __PhoneNumberUtils_H__ */ diff --git a/src/Common/Utils/src/PhoneNumberUtils.cpp b/src/Common/Utils/src/PhoneNumberUtils.cpp new file mode 100644 index 0000000..4b4c030 --- /dev/null +++ b/src/Common/Utils/src/PhoneNumberUtils.cpp @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2009-2016 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. + * + */ + +#include "PhoneNumberUtils.h" +#include "Logger.h" + +#include +#include + +using namespace Msg; + + PhoneNumberUtils &PhoneNumberUtils::getInst() + { + static PhoneNumberUtils inst; + return inst; + } + + std::string PhoneNumberUtils::getNormalizedNumber(const std::string &number) const + { + std::string res; + char *normalizedNum = nullptr; + phone_number_get_normalized_number(number.c_str(), &normalizedNum); + if(normalizedNum) + { + res = normalizedNum; + free(normalizedNum); + } + return res; + } + +PhoneNumberUtils::PhoneNumberUtils() +{ + int res = phone_number_connect(); + MSG_LOG("phone_number_connect = ", res); +} + +PhoneNumberUtils::~PhoneNumberUtils() +{ + phone_number_disconnect(); +} diff --git a/src/Common/Utils/src/ThumbnailMaker.cpp b/src/Common/Utils/src/ThumbnailMaker.cpp index 9a60cab..bd30e57 100644 --- a/src/Common/Utils/src/ThumbnailMaker.cpp +++ b/src/Common/Utils/src/ThumbnailMaker.cpp @@ -59,7 +59,7 @@ ThumbnailMaker::ThumbId ThumbnailMaker::getThumbId(const MsgAddress &address) ThumbnailMaker::ThumbId ThumbnailMaker::getThumbId(const std::string &address) { - ContactPersonAddressRef contact = m_App.getContactManager().getContactPersonAddress(address); + ContactAddressRef contact = m_App.getContactManager().getContactAddress(address); return contact ? getThumbIdFromFile(contact->getThumbnailPath()) : getThumbId(SingleThumb); } @@ -98,7 +98,7 @@ ThumbnailMaker::ThumbId ThumbnailMaker::getThumbId(DefaultThumbs thumb) } else { - ContactOwnerProfileRef ownerProfile = m_App.getContactManager().getOwnerProfile(); + ContactMyProfileRef ownerProfile = m_App.getContactManager().getOwnerProfile(); origin = ownerProfile ? makeOriginThumb(m_App.getWindow(), ownerProfile->getThumbnailPath()) : makeDefaultOriginThumb(m_App.getWindow(), defaultThumbsToPath(SingleThumb)); } diff --git a/src/Conversation/ContactList/Controller/inc/ContactListItem.h b/src/Conversation/ContactList/Controller/inc/ContactListItem.h index b6da9d6..6ddb155 100644 --- a/src/Conversation/ContactList/Controller/inc/ContactListItem.h +++ b/src/Conversation/ContactList/Controller/inc/ContactListItem.h @@ -20,7 +20,7 @@ #include "ContactListViewItem.h" #include "ContactPersonPhoneLog.h" -#include "ContactPersonAddress.h" +#include "ContactAddress.h" #include "App.h" namespace Msg @@ -30,7 +30,7 @@ namespace Msg { public: ContactListItem(const ContactPersonPhoneLog &rec, App &app, const std::string &searchWord); - ContactListItem(const ContactPersonAddress &rec, App &app, const std::string &searchWord); + ContactListItem(const ContactAddress &rec, App &app, const std::string &searchWord); virtual ~ContactListItem(); const std::string &getRecipient() const; diff --git a/src/Conversation/ContactList/Controller/src/ContactListItem.cpp b/src/Conversation/ContactList/Controller/src/ContactListItem.cpp index 03a8976..b7401f9 100644 --- a/src/Conversation/ContactList/Controller/src/ContactListItem.cpp +++ b/src/Conversation/ContactList/Controller/src/ContactListItem.cpp @@ -35,7 +35,7 @@ ContactListItem::ContactListItem(const ContactPersonPhoneLog &rec, App &app, con m_MainText = TextDecorator::highlightKeyword(rec.getAddress(), searchWord); } -ContactListItem::ContactListItem(const ContactPersonAddress &rec, App &app, const std::string &searchWord) +ContactListItem::ContactListItem(const ContactAddress &rec, App &app, const std::string &searchWord) : ContactListItem(rec.getAddress(), app) { setStyle(ContactListViewItem::nameOrEmailStyle); diff --git a/src/Conversation/ContactList/Controller/src/ConvContactList.cpp b/src/Conversation/ContactList/Controller/src/ConvContactList.cpp index 426fb29..8da0028 100644 --- a/src/Conversation/ContactList/Controller/src/ConvContactList.cpp +++ b/src/Conversation/ContactList/Controller/src/ConvContactList.cpp @@ -25,7 +25,7 @@ using namespace Msg; namespace { - inline bool isValid(const ContactPersonAddress &rec) + inline bool isValid(const ContactAddress &rec) { return !rec.getAddress().empty(); } diff --git a/src/Conversation/Main/Controller/inc/Conversation.h b/src/Conversation/Main/Controller/inc/Conversation.h index a30fcd9..03c9795 100644 --- a/src/Conversation/Main/Controller/inc/Conversation.h +++ b/src/Conversation/Main/Controller/inc/Conversation.h @@ -173,7 +173,7 @@ namespace Msg void showSendResultPopup(MsgTransport::SendResult result); void showMobileDataPopup(); void showUnsavedRecipientPopup(const std::string &address); - void showSavedRecipientPopup(const std::string &title, int personId); + void showSavedRecipientPopup(const std::string &title, int contactId, ContactAddress::OwnerType ownerType); void sendMessage(); bool read(Message &msg); bool readMsgAddress(Message &msg); diff --git a/src/Conversation/Main/Controller/inc/PopupRecipientListItem.h b/src/Conversation/Main/Controller/inc/PopupRecipientListItem.h index 9270724..0252924 100644 --- a/src/Conversation/Main/Controller/inc/PopupRecipientListItem.h +++ b/src/Conversation/Main/Controller/inc/PopupRecipientListItem.h @@ -19,6 +19,7 @@ #define PopupRecipientListItem_h_ #include "PopupListItem.h" +#include "ContactAddress.h" namespace Msg { @@ -26,25 +27,38 @@ namespace Msg : public PopupTextListItem { public: - PopupAddressListItem(PopupList &parent, const std::string &text, const std::string &address, - PopupListItemPressedCb cb, void *userData); + PopupAddressListItem(PopupList &parent, + const std::string &text, + const std::string &address, + PopupListItemPressedCb cb, + void *userData); + virtual ~PopupAddressListItem(); std::string getAddress() const; + private: std::string m_Address; }; - class PopupPersonIdListItem : public PopupTextListItem { public: - PopupPersonIdListItem(PopupList &parent, const std::string &text, int personId, - PopupListItemPressedCb cb, void *userData); + PopupPersonIdListItem(PopupList &parent, + const std::string &text, + int contactId, + ContactAddress::OwnerType ownerType, + PopupListItemPressedCb cb, + void *userData); + virtual ~PopupPersonIdListItem(); - int getPersonId() const; + + int getContactId() const; + ContactAddress::OwnerType getContactOwnerType() const; + private: - int m_PersonId; + int m_ContactId; + ContactAddress::OwnerType m_OwnerType; }; } diff --git a/src/Conversation/Main/Controller/src/Conversation.cpp b/src/Conversation/Main/Controller/src/Conversation.cpp index f29b986..1786a5d 100644 --- a/src/Conversation/Main/Controller/src/Conversation.cpp +++ b/src/Conversation/Main/Controller/src/Conversation.cpp @@ -162,19 +162,18 @@ void Conversation::recipientClickHandler(const std::string &address) { MSG_LOG(""); MSG_ASSERT(m_Mode != InitMode, "m_Mode is in initial state"); - ContactPersonAddressRef contactPersonAddress = getApp().getContactManager().getContactPersonAddress(address); - if(contactPersonAddress) + ContactAddressRef contactAddress = getApp().getContactManager().getContactAddress(address); + if(contactAddress) { - int selectedPersonId = contactPersonAddress->getPersonId(); if(m_Mode == NewMessageMode) { MbeRecipientItem *pItem = m_pRecipPanel->getSelectedItem(); if(pItem) - showSavedRecipientPopup(pItem->getDispName(), selectedPersonId); + showSavedRecipientPopup(pItem->getDispName(), contactAddress->getOwnerId(), contactAddress->getOwnerType()); } else if(m_Mode == ConversationMode) { - ContactViewer::launch(selectedPersonId); + ContactViewer::launch(*contactAddress); } } else @@ -183,12 +182,12 @@ void Conversation::recipientClickHandler(const std::string &address) } } -void Conversation::showSavedRecipientPopup(const std::string &title, int personId) +void Conversation::showSavedRecipientPopup(const std::string &title, int contactId, ContactAddress::OwnerType ownerType) { PopupList &popup = createPopupList(title); popup.appendItem(msg("IDS_MSGF_OPT_REMOVE"), POPUPLIST_ITEM_PRESSED_CB(Conversation, onRecipRemoveItemPressed), this); popup.appendItem(msg("IDS_MSG_OPT_EDIT"), POPUPLIST_ITEM_PRESSED_CB(Conversation, onEditItemPressed), this); - popup.appendItem(*new PopupPersonIdListItem(popup, msg("IDS_MSG_OPT_VIEW_CONTACT_DETAILS_ABB"), personId, + popup.appendItem(*new PopupPersonIdListItem(popup, msg("IDS_MSG_OPT_VIEW_CONTACT_DETAILS_ABB"), contactId, ownerType, POPUPLIST_ITEM_PRESSED_CB(Conversation, onViewContactDetailsItemPressed), this)); popup.show(); } @@ -1026,9 +1025,10 @@ void Conversation::onEditItemPressed(PopupListItem &item) void Conversation::onViewContactDetailsItemPressed(PopupListItem &item) { MSG_LOG(""); - int personId = static_cast(item).getPersonId(); + int id = static_cast(item).getContactId(); + auto ownerType = static_cast(item).getContactOwnerType(); item.getParent().destroy(); - ContactViewer::launch(personId); + ContactViewer::launch(id, ownerType); } void Conversation::onAllItemsDeleted(ConvList &list) diff --git a/src/Conversation/Main/Controller/src/PopupRecipientListItem.cpp b/src/Conversation/Main/Controller/src/PopupRecipientListItem.cpp index 2d7ade1..b16c7e4 100644 --- a/src/Conversation/Main/Controller/src/PopupRecipientListItem.cpp +++ b/src/Conversation/Main/Controller/src/PopupRecipientListItem.cpp @@ -19,8 +19,11 @@ using namespace Msg; -PopupAddressListItem::PopupAddressListItem(PopupList &parent, const std::string &text, const std::string &address, - PopupListItemPressedCb cb, void *userData) +PopupAddressListItem::PopupAddressListItem(PopupList &parent, + const std::string &text, + const std::string &address, + PopupListItemPressedCb cb, + void *userData) : PopupTextListItem(parent, text, cb, userData) , m_Address(address) { @@ -36,10 +39,15 @@ std::string PopupAddressListItem::getAddress() const } -PopupPersonIdListItem::PopupPersonIdListItem(PopupList &parent, const std::string &text, int personId, - PopupListItemPressedCb cb, void *userData) +PopupPersonIdListItem::PopupPersonIdListItem(PopupList &parent, + const std::string &text, + int contactId, + ContactAddress::OwnerType ownerType, + PopupListItemPressedCb cb, + void *userData) : PopupTextListItem(parent, text, cb, userData) - , m_PersonId(personId) + , m_ContactId(contactId) + , m_OwnerType(ownerType) { } @@ -47,7 +55,12 @@ PopupPersonIdListItem::~PopupPersonIdListItem() { } -int PopupPersonIdListItem::getPersonId() const +int PopupPersonIdListItem::getContactId() const { - return m_PersonId; + return m_ContactId; +} + +ContactAddress::OwnerType PopupPersonIdListItem::getContactOwnerType() const +{ + return m_OwnerType; } diff --git a/src/Conversation/Utils/src/MessageDetailContent.cpp b/src/Conversation/Utils/src/MessageDetailContent.cpp index aaa043b..3b90e2d 100644 --- a/src/Conversation/Utils/src/MessageDetailContent.cpp +++ b/src/Conversation/Utils/src/MessageDetailContent.cpp @@ -128,7 +128,7 @@ std::string MessageDetailContent::getContactsInfo(App &app, Message::Direction m for(int i = 0; i < addressListLength; ++i) { std::string address = addrList->at(i).getAddress(); - ContactPersonAddressRef contact = app.getContactManager().getContactPersonAddress(address); + ContactAddressRef contact = app.getContactManager().getContactAddress(address); if(contact) { contactsInfo.append(contact->getDispName().c_str()); diff --git a/src/MsgThread/Controller/inc/BaseThreadListItem.h b/src/MsgThread/Controller/inc/BaseThreadListItem.h index fb1fa2c..7362049 100644 --- a/src/MsgThread/Controller/inc/BaseThreadListItem.h +++ b/src/MsgThread/Controller/inc/BaseThreadListItem.h @@ -19,7 +19,7 @@ #define BaseThreadListItem_h_ #include "ThreadListViewItem.h" -#include "ContactPersonAddress.h" +#include "ContactAddress.h" #include "ThumbnailMaker.h" #include "MsgThreadItem.h" #include "MsgAddress.h" @@ -39,7 +39,7 @@ namespace Msg void updateThumbnailAndName(const MsgAddressList &addressList, bool decorateName); void updateThumbnailAndName(const MsgThreadItem &threadItem, bool decorateName); void updateName(const MsgAddress &address, int addressesCount, bool decorateName); - void updateName(const ContactPersonAddress &address, int addressesCount, bool decorateName); + void updateName(const ContactAddress &address, int addressesCount, bool decorateName); void updateName(const std::string &address, int addressesCount, bool decorateName); void updateTime(time_t time); void updateTime(); diff --git a/src/MsgThread/Controller/src/BaseThreadListItem.cpp b/src/MsgThread/Controller/src/BaseThreadListItem.cpp index a954bbd..ea3a624 100644 --- a/src/MsgThread/Controller/src/BaseThreadListItem.cpp +++ b/src/MsgThread/Controller/src/BaseThreadListItem.cpp @@ -76,14 +76,14 @@ void BaseThreadListItem::updateThumbnailAndName(const MsgAddressList &addressLis void BaseThreadListItem::updateName(const MsgAddress &address, int addressesCount, bool decorateName) { - ContactPersonAddressRef contactAddress = m_App.getContactManager().getContactPersonAddress(address.getAddress()); + ContactAddressRef contactAddress = m_App.getContactManager().getContactAddress(address.getAddress()); if(contactAddress) updateName(*contactAddress, addressesCount, decorateName); else updateName(address.getAddress(), addressesCount, decorateName); } -void BaseThreadListItem::updateName(const ContactPersonAddress &address, int addressesCount, bool decorateName) +void BaseThreadListItem::updateName(const ContactAddress &address, int addressesCount, bool decorateName) { std::string dispName = address.getDispName(); if(dispName.empty()) diff --git a/src/Viewer/Controller/src/Viewer.cpp b/src/Viewer/Controller/src/Viewer.cpp index 2e02b9a..2a77f02 100644 --- a/src/Viewer/Controller/src/Viewer.cpp +++ b/src/Viewer/Controller/src/Viewer.cpp @@ -223,9 +223,9 @@ void Viewer::recipientClickHandler(const std::string &address) { MSG_LOG(""); m_SelectedAddress = address; - ContactPersonAddressRef contactPersonAddress = getApp().getContactManager().getContactPersonAddress(address); - if(contactPersonAddress) - ContactViewer::launch(contactPersonAddress->getPersonId()); + ContactAddressRef contactAddress = getApp().getContactManager().getContactAddress(address); + if(contactAddress) + ContactViewer::launch(*contactAddress); else showRecipPopup(address); } -- 2.7.4