1# Copyright (C) 2021-2022 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15
16config("mms_native_config") {
17  visibility = [ "*:*" ]
18  include_dirs = [
19    "include",
20    "include/utils",
21    "../../../interfaces/innerkits",
22  ]
23}
24
25ohos_source_set("mms_native_source") {
26  sanitize = {
27    cfi = true
28    cfi_cross_dso = true
29    debug = false
30  }
31  branch_protector_ret = "pac_ret"
32  sources = [
33    "src/mms_address.cpp",
34    "src/mms_attachment.cpp",
35    "src/mms_body.cpp",
36    "src/mms_body_part.cpp",
37    "src/mms_body_part_header.cpp",
38    "src/mms_buffer.cpp",
39    "src/mms_content_param.cpp",
40    "src/mms_content_type.cpp",
41    "src/mms_decode_buffer.cpp",
42    "src/mms_encode_buffer.cpp",
43    "src/mms_encode_string.cpp",
44    "src/mms_header.cpp",
45    "src/mms_header_categ.cpp",
46    "src/mms_msg.cpp",
47    "src/utils/mms_base64.cpp",
48    "src/utils/mms_charset.cpp",
49    "src/utils/mms_quoted_printable.cpp",
50  ]
51
52  include_dirs = [ ":mms_native_config" ]
53
54  external_deps = [
55    "c_utils:utils",
56    "core_service:libtel_common",
57    "hilog:libhilog",
58    "ipc:ipc_core",
59    "safwk:system_ability_fwk",
60    "samgr:samgr_proxy",
61  ]
62
63  defines = [
64    "TELEPHONY_LOG_TAG = \"MmsApi\"",
65    "LOG_DOMAIN = 0xD001F06",
66  ]
67
68  public_configs = [ ":mms_native_config" ]
69
70  part_name = "sms_mms"
71  subsystem_name = "telephony"
72}
73