1# Copyright (c) 2023 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("../../../device_status.gni")
15
16config("intention_socket_server_public_config") {
17  include_dirs = [ "include" ]
18}
19
20ohos_source_set("intention_socket_server") {
21  sanitize = {
22    integer_overflow = true
23    ubsan = true
24    boundary_sanitize = true
25    cfi = true
26    cfi_cross_dso = true
27    debug = false
28  }
29
30  branch_protector_ret = "pac_ret"
31
32  defines = device_status_default_defines
33
34  include_dirs = [ "include" ]
35
36  sources = [
37    "src/socket_params.cpp",
38    "src/socket_server.cpp",
39  ]
40
41  public_configs = [ ":intention_socket_server_public_config" ]
42
43  deps = [
44    "${device_status_root_path}/intention/prototype:intention_prototype",
45    "${device_status_root_path}/utils/common:devicestatus_util",
46    "${device_status_root_path}/utils/ipc:devicestatus_ipc",
47  ]
48
49  external_deps = [
50    "access_token:libaccesstoken_sdk",
51    "graphic_2d:librender_service_client",
52    "hilog:libhilog",
53    "image_framework:image_native",
54    "input:libmmi-client",
55    "window_manager:libdm",
56  ]
57
58  subsystem_name = "${device_status_subsystem_name}"
59  part_name = "${device_status_part_name}"
60}
61
62config("intention_socket_session_manager_public_config") {
63  include_dirs = [ "include" ]
64}
65
66ohos_source_set("intention_socket_session_manager") {
67  sanitize = {
68    integer_overflow = true
69    ubsan = true
70    boundary_sanitize = true
71    cfi = true
72    cfi_cross_dso = true
73    debug = false
74  }
75
76  branch_protector_ret = "pac_ret"
77
78  defines = device_status_default_defines
79
80  include_dirs = [ "include" ]
81
82  sources = [
83    "src/socket_session.cpp",
84    "src/socket_session_manager.cpp",
85  ]
86
87  public_configs = [ ":intention_socket_session_manager_public_config" ]
88
89  deps = [
90    "${device_status_root_path}/intention/common/epoll:intention_epoll",
91    "${device_status_root_path}/intention/prototype:intention_prototype",
92    "${device_status_root_path}/utils/common:devicestatus_util",
93    "${device_status_root_path}/utils/ipc:devicestatus_ipc",
94  ]
95
96  external_deps = [
97    "ability_runtime:app_manager",
98    "hilog:libhilog",
99    "image_framework:image_native",
100    "input:libmmi-client",
101    "samgr:samgr_proxy",
102  ]
103
104  subsystem_name = "${device_status_subsystem_name}"
105  part_name = "${device_status_part_name}"
106}
107
108config("intention_socket_connection_public_config") {
109  include_dirs = [ "include" ]
110}
111
112ohos_source_set("intention_socket_connection") {
113  sanitize = {
114    integer_overflow = true
115    ubsan = true
116    boundary_sanitize = true
117    cfi = true
118    cfi_cross_dso = true
119    debug = false
120  }
121
122  branch_protector_ret = "pac_ret"
123
124  defines = device_status_default_defines
125
126  include_dirs = [ "include" ]
127
128  sources = [
129    "src/socket_client.cpp",
130    "src/socket_connection.cpp",
131    "src/socket_params.cpp",
132  ]
133
134  public_configs = [ ":intention_socket_connection_public_config" ]
135
136  deps = [
137    "${device_status_root_path}/intention/common/epoll:intention_epoll",
138    "${device_status_root_path}/intention/prototype:intention_prototype",
139    "${device_status_root_path}/utils/common:devicestatus_util",
140    "${device_status_root_path}/utils/ipc:devicestatus_ipc",
141  ]
142
143  external_deps = [
144    "c_utils:utils",
145    "eventhandler:libeventhandler",
146    "hilog:libhilog",
147  ]
148
149  subsystem_name = "${device_status_subsystem_name}"
150  part_name = "${device_status_part_name}"
151}
152