• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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/config/components/idl_tool/idl.gni")
15import("./../../../multimedia_camera_framework.gni")
16
17idl_gen_interface("camera_service_idl_interface") {
18  sources = [
19    "ICameraDeviceService.idl",
20    "ICaptureSession.idl",
21    "IStreamCommon.idl",
22    "ICameraService.idl",
23    "IStreamCapture.idl",
24    "IStreamDepthData.idl",
25    "IStreamMetadata.idl",
26    "IStreamRepeat.idl",
27    "IMechSession.idl",
28  ]
29  sources_callback = [
30    "ICameraDeviceServiceCallback.idl",
31    "ICaptureSessionCallback.idl",
32    "ICameraServiceCallback.idl",
33    "IStreamCaptureCallback.idl",
34    "IStreamDepthDataCallback.idl",
35    "IStreamMetadataCallback.idl",
36    "IStreamRepeatCallback.idl",
37    "ITorchServiceCallback.idl",
38    "IFoldServiceCallback.idl",
39    "ICameraMuteServiceCallback.idl",
40    "IControlCenterStatusCallback",
41    "IControlCenterEffectStatusCallback",
42    "IPressureStatusCallback.idl",
43    "IMechSessionCallback.idl",
44    "IStreamCapturePhotoAssetCallback.idl",
45  ]
46
47  sources_common = [ "CameraTypes.idl" ]
48
49  hitrace = "HITRACE_TAG_ABILITY_MANAGER"
50
51  subsystem_name = "multimedia"
52  part_name = "camera_framework"
53}
54
55config("camera_sa_idl_config") {
56  include_dirs = [
57    "./",
58    "${target_gen_dir}",
59    "${multimedia_camera_framework_path}/common/utils",
60    "${multimedia_camera_framework_path}/interfaces/inner_api/native/camera/include",
61    "${multimedia_camera_framework_path}/services/camera_service/binder/base/include",
62    "${multimedia_camera_framework_path}/interfaces/inner_api/native/camera/include/utils",
63  ]
64}
65
66ohos_source_set("camera_idl_sa_proxy") {
67  output_values = get_target_outputs(":camera_service_idl_interface")
68  sources = filter_include(output_values,
69                           [
70                             "*_service_proxy.cpp",
71                             "*_session_proxy.cpp",
72                             "*_capture_proxy.cpp",
73                             "*_depth_data_proxy.cpp",
74                             "*_metadata_proxy.cpp",
75                             "*_repeat_proxy.cpp",
76                             "*_callback_stub.cpp",
77                             "*_types.cpp",
78                           ])
79
80  public_configs = [
81    ":camera_sa_idl_config",
82    "${multimedia_camera_framework_path}/services/deferred_processing_service/idls:deferred_processing_service_idl_config"
83  ]
84
85  deps = [ ":camera_service_idl_interface" ]
86
87  cflags = [
88    "-Wall",
89    "-fPIC",
90    "-fdata-sections",
91    "-ffunction-sections",
92    "-fno-asynchronous-unwind-tables",
93    "-fno-unwind-tables",
94    "-Os",
95  ]
96  if (target_cpu == "arm") {
97    cflags += [ "-DBINDER_IPC_32BIT" ]
98  }
99
100  sanitize = {
101    integer_overflow = true
102    ubsan = true
103    boundary_sanitize = true
104    cfi = true
105    cfi_cross_dso = true
106    cfi_vcall_icall_only = true
107    debug = false
108  }
109
110  external_deps = [
111    "c_utils:utils",
112    "hitrace:hitrace_meter",
113    "ipc:ipc_single",
114    "drivers_interface_camera:metadata",
115    "graphic_surface:surface",
116    "ipc:ipc_core",
117    "safwk:system_ability_fwk",
118    "samgr:samgr_proxy",
119    "window_manager:libdm",
120    "window_manager:libwm",
121  ]
122
123  part_name = "camera_framework"
124  subsystem_name = "multimedia"
125}
126
127ohos_source_set("camera_idl_sa_stub") {
128  output_values = get_target_outputs(":camera_service_idl_interface")
129  sources = filter_include(output_values,
130                           [
131                             "*_service_stub.cpp",
132                             "*_session_stub.cpp",
133                             "*_capture_stub.cpp",
134                             "*_depth_data_stub.cpp",
135                             "*_metadata_stub.cpp",
136                             "*_repeat_stub.cpp",
137                             "*_callback_proxy.cpp",
138                             "*_types.cpp",
139                           ])
140
141  public_configs = [ ":camera_sa_idl_config",
142                     "${multimedia_camera_framework_path}/services/deferred_processing_service/idls:deferred_processing_service_idl_config",
143                   ]
144
145  deps = [ ":camera_service_idl_interface" ]
146
147  cflags = [
148    "-Wall",
149    "-fPIC",
150    "-fdata-sections",
151    "-ffunction-sections",
152    "-fno-asynchronous-unwind-tables",
153    "-fno-unwind-tables",
154    "-Os",
155  ]
156  if (target_cpu == "arm") {
157    cflags += [ "-DBINDER_IPC_32BIT" ]
158  }
159
160  sanitize = {
161    integer_overflow = true
162    ubsan = true
163    boundary_sanitize = true
164    cfi = true
165    cfi_cross_dso = true
166    cfi_vcall_icall_only = true
167    debug = false
168  }
169
170  external_deps = [
171    "c_utils:utils",
172    "hitrace:hitrace_meter",
173    "ipc:ipc_single",
174    "drivers_interface_camera:metadata",
175    "graphic_surface:surface",
176    "ipc:ipc_core",
177    "safwk:system_ability_fwk",
178    "samgr:samgr_proxy",
179    "window_manager:libdm",
180    "window_manager:libwm",
181  ]
182
183  part_name = "camera_framework"
184  subsystem_name = "multimedia"
185}
186