Skip to content

Commit bc7247c

Browse files
committed
code check
1 parent 1677a33 commit bc7247c

18 files changed

+192
-86
lines changed

harmony/smart_refresh_layout/src/main/cpp/ComponentDescriptors.h

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
1-
21
/**
3-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
2+
* Copyright (C) 2023 Huawei Device Co., Ltd.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* you may obtain a copy of the License at
47
*
5-
* Do not edit this file as changes may cause incorrect behavior and will be lost
6-
* once the code is regenerated.
8+
* http://www.apache.org/licenses/LICENSE-2.0
79
*
8-
* @generated by codegen project: GenerateComponentDescriptorH.js
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
915
*/
1016

11-
#pragma once
17+
#ifndef SMART_SRC_MAIN_CPP_COMPONENTDESCRIPTORS_H
18+
#define SMART_SRC_MAIN_CPP_COMPONENTDESCRIPTORS_H
1219

20+
#pragma once
1321
#include "ShadowNodes.h"
1422
#include <react/renderer/core/ConcreteComponentDescriptor.h>
1523

@@ -25,3 +33,5 @@ using RNCStoreHouseHeaderComponentDescriptor = ConcreteComponentDescriptor<RNCSt
2533

2634
} // namespace react
2735
} // namespace facebook
36+
37+
#endif

harmony/smart_refresh_layout/src/main/cpp/EventEmitters.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
21
/**
3-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
2+
* Copyright (C) 2023 Huawei Device Co., Ltd.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* you may obtain a copy of the License at
47
*
5-
* Do not edit this file as changes may cause incorrect behavior and will be lost
6-
* once the code is regenerated.
8+
* http://www.apache.org/licenses/LICENSE-2.0
79
*
8-
* @generated by codegen project: GenerateEventEmitterCpp.js
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
915
*/
1016

1117
#include "EventEmitters.h"

harmony/smart_refresh_layout/src/main/cpp/EventEmitters.h

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
/**
2-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
2+
* Copyright (C) 2023 Huawei Device Co., Ltd.
33
*
4-
* Do not edit this file as changes may cause incorrect behavior and will be lost
5-
* once the code is regenerated.
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* you may obtain a copy of the License at
67
*
7-
* @generated by codegen project: GenerateEventEmitterH.js
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
815
*/
16+
17+
#ifndef SMART_SRC_MAIN_CPP_EVENTEMITTERS_H
18+
#define SMART_SRC_MAIN_CPP_EVENTEMITTERS_H
19+
920
#pragma once
1021

1122
#include <react/renderer/components/view/ViewEventEmitter.h>
@@ -101,3 +112,4 @@ class JSI_EXPORT RNCStoreHouseHeaderEventEmitter : public ViewEventEmitter {
101112

102113
} // namespace react
103114
} // namespace facebook
115+
#endif

harmony/smart_refresh_layout/src/main/cpp/Props.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
21
/**
3-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
2+
* Copyright (C) 2023 Huawei Device Co., Ltd.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* you may obtain a copy of the License at
47
*
5-
* Do not edit this file as changes may cause incorrect behavior and will be lost
6-
* once the code is regenerated.
8+
* http://www.apache.org/licenses/LICENSE-2.0
79
*
8-
* @generated by codegen project: GeneratePropsCpp.js
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
915
*/
1016

1117
#include "Props.h"

harmony/smart_refresh_layout/src/main/cpp/Props.h

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
1-
21
/**
3-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
2+
* Copyright (C) 2023 Huawei Device Co., Ltd.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* you may obtain a copy of the License at
47
*
5-
* Do not edit this file as changes may cause incorrect behavior and will be lost
6-
* once the code is regenerated.
8+
* http://www.apache.org/licenses/LICENSE-2.0
79
*
8-
* @generated by codegen project: GeneratePropsH.js
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
915
*/
16+
17+
#ifndef SMART_SRC_MAIN_CPP_PROPS_H
18+
#define SMART_SRC_MAIN_CPP_PROPS_H
19+
1020
#pragma once
1121

1222
#include <jsi/jsi.h>
@@ -115,3 +125,4 @@ class JSI_EXPORT RNCStoreHouseHeaderProps final : public ViewProps {
115125

116126
} // namespace react
117127
} // namespace facebook
128+
#endif

harmony/smart_refresh_layout/src/main/cpp/RNCAnyHeaderJSIBinder.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
/*
1+
/**
22
* Copyright (C) 2023 Huawei Device Co., Ltd.
3+
*
34
* Licensed under the Apache License, Version 2.0 (the "License");
45
* you may not use this file except in compliance with the License.
5-
* You may obtain a copy of the License at
6+
* you may obtain a copy of the License at
67
*
78
* http://www.apache.org/licenses/LICENSE-2.0
89
*
@@ -12,6 +13,10 @@
1213
* See the License for the specific language governing permissions and
1314
* limitations under the License.
1415
*/
16+
17+
#ifndef SMART_SRC_MAIN_CPP_RNCANYHEADERJSIBINDER_H
18+
#define SMART_SRC_MAIN_CPP_RNCANYHEADERJSIBINDER_H
19+
1520
#pragma once
1621
#include "RNOH/UIManagerModule.h"
1722
#include "RNOH/BaseComponentJSIBinder.h"
@@ -32,4 +37,5 @@ class RNCAnyHeaderJSIBinder : public ViewComponentJSIBinder {
3237
}
3338
};
3439

35-
} // namespace rnoh
40+
} // namespace rnoh
41+
#endif

harmony/smart_refresh_layout/src/main/cpp/RNCAnyHeaderNapiBinder.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
/*
1+
/**
22
* Copyright (C) 2023 Huawei Device Co., Ltd.
3+
*
34
* Licensed under the Apache License, Version 2.0 (the "License");
45
* you may not use this file except in compliance with the License.
5-
* You may obtain a copy of the License at
6+
* you may obtain a copy of the License at
67
*
78
* http://www.apache.org/licenses/LICENSE-2.0
89
*
@@ -12,6 +13,10 @@
1213
* See the License for the specific language governing permissions and
1314
* limitations under the License.
1415
*/
16+
17+
#ifndef SMART_SRC_MAIN_CPP_RNCANYHEADERNAPIBINDER_H
18+
#define SMART_SRC_MAIN_CPP_RNCANYHEADERNAPIBINDER_H
19+
1520
#pragma once
1621
#include "RNOH/BaseComponentNapiBinder.h"
1722
#include "Props.h"
@@ -35,3 +40,4 @@ class RNCAnyHeaderNapiBinder : public ViewComponentNapiBinder {
3540
};
3641

3742
} // namespace rnoh
43+
#endif

harmony/smart_refresh_layout/src/main/cpp/RNCDefaultHeaderJSIBinder.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
/*
1+
/**
22
* Copyright (C) 2023 Huawei Device Co., Ltd.
3+
*
34
* Licensed under the Apache License, Version 2.0 (the "License");
45
* you may not use this file except in compliance with the License.
5-
* You may obtain a copy of the License at
6+
* you may obtain a copy of the License at
67
*
78
* http://www.apache.org/licenses/LICENSE-2.0
89
*
@@ -12,6 +13,10 @@
1213
* See the License for the specific language governing permissions and
1314
* limitations under the License.
1415
*/
16+
17+
#ifndef SMART_SRC_MAIN_CPP_RNCDEFAULTHEADERJSIBINDER_H
18+
#define SMART_SRC_MAIN_CPP_RNCDEFAULTHEADERJSIBINDER_H
19+
1520
#pragma once
1621
#include "RNOH/UIManagerModule.h"
1722
#include "RNOH/BaseComponentJSIBinder.h"
@@ -33,4 +38,5 @@ class RNCDefaultHeaderJSIBinder : public ViewComponentJSIBinder {
3338
}
3439
};
3540

36-
} // namespace rnoh
41+
} // namespace rnoh
42+
#endif

harmony/smart_refresh_layout/src/main/cpp/RNCDefaultHeaderNapiBinder.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
* See the License for the specific language governing permissions and
1313
* limitations under the License.
1414
*/
15-
#pragma once
15+
#ifndef SMART_SRC_MAIN_CPP_RNCDEFAULTHEADERNAPIBINDER_H
16+
#define SMART_SRC_MAIN_CPP_RNCDEFAULTHEADERNAPIBINDER_H
1617
#include "RNOH/BaseComponentNapiBinder.h"
1718
#include "Props.h"
1819
#include "RNOHCorePackage/ComponentBinders/ViewComponentNapiBinder.h"
@@ -22,7 +23,8 @@ namespace rnoh {
2223

2324
class RNCDefaultHeaderNapiBinder : public ViewComponentNapiBinder {
2425
public:
25-
napi_value createProps(napi_env env, facebook::react::ShadowView const shadowView) override {
26+
napi_value createProps(napi_env env, facebook::react::ShadowView const shadowView) override
27+
{
2628
napi_value napiBaseProps = ViewComponentNapiBinder::createProps(env, shadowView);
2729
if (auto props = std::dynamic_pointer_cast<const facebook::react::RNCDefaultHeaderProps>(shadowView.props)) {
2830
return ArkJS(env)
@@ -36,3 +38,4 @@ class RNCDefaultHeaderNapiBinder : public ViewComponentNapiBinder {
3638
};
3739

3840
} // namespace rnoh
41+
#endif

harmony/smart_refresh_layout/src/main/cpp/ShadowNodes.cpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
2-
/**
3-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
1+
/*
2+
* Copyright (C) 2023 Huawei Device Co., Ltd.
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
46
*
5-
* Do not edit this file as changes may cause incorrect behavior and will be lost
6-
* once the code is regenerated.
7+
* http://www.apache.org/licenses/LICENSE-2.0
78
*
8-
* @generated by codegen project: GenerateShadowNodeCpp.js
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
914
*/
1015

1116
#include "ShadowNodes.h"

harmony/smart_refresh_layout/src/main/cpp/ShadowNodes.h

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1-
2-
/**
3-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
1+
/*
2+
* Copyright (C) 2023 Huawei Device Co., Ltd.
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
46
*
5-
* Do not edit this file as changes may cause incorrect behavior and will be lost
6-
* once the code is regenerated.
7+
* http://www.apache.org/licenses/LICENSE-2.0
78
*
8-
* @generated by codegen project: GenerateShadowNodeH.js
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
914
*/
1015

11-
#pragma once
16+
#ifndef SMART_SRC_MAIN_CPP_SHADOWNODES_H
17+
#define SMART_SRC_MAIN_CPP_SHADOWNODES_H
1218

1319
#include "EventEmitters.h"
1420
#include "Props.h"
@@ -87,3 +93,4 @@ using RNCStoreHouseHeaderShadowNode = ConcreteViewShadowNode<
8793

8894
} // namespace react
8995
} // namespace facebook
96+
#endif

harmony/smart_refresh_layout/src/main/cpp/SmartRefreshControlComponentJSIBinder.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
* See the License for the specific language governing permissions and
1313
* limitations under the License.
1414
*/
15-
#pragma once
15+
#ifndef SMART_SRC_MAIN_CPP_SMARTREFRESHCONTROLCOMPONENTJSIBINDER_H
16+
#define SMART_SRC_MAIN_CPP_SMARTREFRESHCONTROLCOMPONENTJSIBINDER_H
1617
#include "RNOH/UIManagerModule.h"
1718
#include "RNOH/BaseComponentJSIBinder.h"
1819
#include "RNOHCorePackage/ComponentBinders/ViewComponentJSIBinder.h"
@@ -32,11 +33,7 @@ class SmartRefreshControlComponentJSIBinder : public ViewComponentJSIBinder {
3233
nativeProps.setProperty(rt, "primaryColor", "number");
3334
return nativeProps;
3435
}
35-
//
36-
// facebook::jsi::Object createBubblingEventTypes(facebook::jsi::Runtime &rt) override {
37-
// return facebook::jsi::Object(rt);
38-
// }
39-
//
36+
4037
facebook::jsi::Object createDirectEventTypes(facebook::jsi::Runtime &rt) override {
4138
facebook::jsi::Object events(rt);
4239
events.setProperty(rt, "topRefresh", createDirectEvent(rt, "onRefresh"));
@@ -47,4 +44,5 @@ class SmartRefreshControlComponentJSIBinder : public ViewComponentJSIBinder {
4744
}
4845
};
4946

50-
} // namespace rnoh
47+
} // namespace rnoh
48+
#endif

harmony/smart_refresh_layout/src/main/cpp/SmartRefreshControlComponentNapiBinder.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
* See the License for the specific language governing permissions and
1313
* limitations under the License.
1414
*/
15-
#pragma once
15+
#ifndef SMART_SRC_MAIN_CPP_SMARTREFRESHLAYOUTCOMPONENTNAPIBINDER_H
16+
#define SMART_SRC_MAIN_CPP_SMARTREFRESHLAYOUTCOMPONENTNAPIBINDER_H
1617
#include "RNOH/BaseComponentNapiBinder.h"
1718
#include "Props.h"
1819
#include "RNOHCorePackage/ComponentBinders/ViewComponentNapiBinder.h"
@@ -22,7 +23,8 @@ namespace rnoh {
2223

2324
class SmartRefreshLayoutComponentNapiBinder : public ViewComponentNapiBinder {
2425
public:
25-
napi_value createProps(napi_env env, facebook::react::ShadowView const shadowView) override {
26+
napi_value createProps(napi_env env, facebook::react::ShadowView const shadowView) override
27+
{
2628
napi_value napiBaseProps = ViewComponentNapiBinder::createProps(env, shadowView);
2729
if (auto props = std::dynamic_pointer_cast<const facebook::react::SmartRefreshLayoutProps>(shadowView.props)) {
2830
return ArkJS(env)
@@ -45,3 +47,4 @@ class SmartRefreshLayoutComponentNapiBinder : public ViewComponentNapiBinder {
4547
};
4648

4749
} // namespace rnoh
50+
#endif

0 commit comments

Comments
 (0)