已合并
bugfix:fix DECL_TYPE #4791
bugfix:fix DECL_TYPE #4791
已合并
yaoji创建于 18 天前
2 个文件变更+2-26
@@ -33,12 +33,8 @@ public:
33};33};
34 34 
35class CJCameraInput : public OHOS::FFI::FFIData {35class CJCameraInput : public OHOS::FFI::FFIData {
36+ DECL_TYPE(CJCameraInput, OHOS::FFI::FFIData)
36public:37public:
37- OHOS::FFI::RuntimeType *GetRuntimeType() override
38- {
39- return GetClassType();
40- }
41- 
42 CJCameraInput(sptr<CameraInput> cameraInputInstance);38 CJCameraInput(sptr<CameraInput> cameraInputInstance);
43 ~CJCameraInput() override;39 ~CJCameraInput() override;
44 40 
@@ -53,14 +49,6 @@ public:
53 49 
54private:50private:
55 sptr<CameraStandard::CameraInput> cameraInput_;51 sptr<CameraStandard::CameraInput> cameraInput_;
56- friend class OHOS::FFI::RuntimeType;
57- friend class OHOS::FFI::TypeBase;
58- static OHOS::FFI::RuntimeType *GetClassType()
59- {
60- static OHOS::FFI::RuntimeType runtimeType = OHOS::FFI::RuntimeType::Create<OHOS::FFI::FFIData>("CJCameraInput");
61- return &runtimeType;
62- }
63- 
64 std::shared_ptr<CJErrorCallbackListener> errorCallback_;52 std::shared_ptr<CJErrorCallbackListener> errorCallback_;
65};53};
66} // namespace CameraStandard54} // namespace CameraStandard
@@ -52,12 +52,8 @@ public:
52};52};
53 53 
54class CJSession : public OHOS::FFI::FFIData {54class CJSession : public OHOS::FFI::FFIData {
55+ DECL_TYPE(CJSession, OHOS::FFI::FFIData)
55public:56public:
56- OHOS::FFI::RuntimeType *GetRuntimeType() override
57- {
58- return GetClassType();
59- }
60- 
61 explicit CJSession(sptr<CameraStandard::CaptureSession> session);57 explicit CJSession(sptr<CameraStandard::CaptureSession> session);
62 58 
63 sptr<CameraStandard::CaptureSession> GetCaptureSession();59 sptr<CameraStandard::CaptureSession> GetCaptureSession();
@@ -147,14 +143,6 @@ private:
147 std::shared_ptr<CJSmoothZoomCallback> smoothZoomCallback_;143 std::shared_ptr<CJSmoothZoomCallback> smoothZoomCallback_;
148 std::shared_ptr<CJSessionCallback> errorCallback_;144 std::shared_ptr<CJSessionCallback> errorCallback_;
149 std::shared_ptr<CJFocusStateCallback> focusStateCallback_;145 std::shared_ptr<CJFocusStateCallback> focusStateCallback_;
150- 
151- friend class OHOS::FFI::RuntimeType;
152- friend class OHOS::FFI::TypeBase;
153- static OHOS::FFI::RuntimeType *GetClassType()
154- {
155- static OHOS::FFI::RuntimeType runtimeType = OHOS::FFI::RuntimeType::Create<OHOS::FFI::FFIData>("CJSession");
156- return &runtimeType;
157- }
158};146};
159 147 
160} // namespace CameraStandard148} // namespace CameraStandard