Skip to content

Commit

Permalink
[Darwin] Cleanup unused imports and forward declare where possible (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sagar-apple authored Nov 20, 2020
1 parent fba2fdc commit f408bf6
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 14 deletions.
1 change: 1 addition & 0 deletions src/darwin/Framework/CHIP/CHIP.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

// pull together CHIP headers
#import <CHIP/CHIPDevice.h>
#import <CHIP/CHIPDeviceCallback.h>
#import <CHIP/CHIPDeviceController.h>
#import <CHIP/CHIPDevicePairingDelegate.h>
#import <CHIP/CHIPError.h>
Expand Down
6 changes: 3 additions & 3 deletions src/darwin/Framework/CHIP/CHIPDeviceController.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
#ifndef CHIP_DEVICE_CONTROLLER_H
#define CHIP_DEVICE_CONTROLLER_H

#import "CHIPDevice.h"
#import "CHIPDeviceStatusDelegate.h"
#import "CHIPError.h"
#import <CHIP/CHIPDeviceStatusDelegate.h>
#import <Foundation/Foundation.h>

@class CHIPDevice;

NS_ASSUME_NONNULL_BEGIN

typedef void (^ControllerOnConnectedBlock)(void);
Expand Down
1 change: 0 additions & 1 deletion src/darwin/Framework/CHIP/CHIPDevicePairingDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* limitations under the License.
*/

#import "CHIPError.h"
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

#import "CHIPDevicePairingDelegateBridge.h"
#import "CHIPError.h"
#import <Foundation/Foundation.h>

CHIPDevicePairingDelegateBridge::CHIPDevicePairingDelegateBridge(void)
Expand Down
1 change: 0 additions & 1 deletion src/darwin/Framework/CHIP/CHIPDeviceStatusDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* limitations under the License.
*/

#import "CHIPError.h"
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
Expand Down
4 changes: 2 additions & 2 deletions src/darwin/Framework/CHIP/CHIPManualSetupPayloadParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// module header
#import "CHIPSetupPayload.h"

#import <Foundation/Foundation.h>

@class CHIPSetupPayload;

NS_ASSUME_NONNULL_BEGIN

@interface CHIPManualSetupPayloadParser : NSObject
Expand Down
1 change: 1 addition & 0 deletions src/darwin/Framework/CHIP/CHIPManualSetupPayloadParser.mm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#import "CHIPError.h"
#import "CHIPLogging.h"
#import "CHIPSetupPayload.h"

#import <setup_payload/ManualSetupPayloadParser.h>
#import <setup_payload/SetupPayload.h>
Expand Down
5 changes: 3 additions & 2 deletions src/darwin/Framework/CHIP/CHIPOnOff.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
#ifndef CHIP_ONOFF_H
#define CHIP_ONOFF_H

#import "CHIPDevice.h"
#import "CHIPDeviceCallback.h"
#import <CHIP/CHIPDeviceCallback.h>
#import <Foundation/Foundation.h>

@class CHIPDevice;

NS_ASSUME_NONNULL_BEGIN

@interface CHIPOnOff : NSObject
Expand Down
1 change: 1 addition & 0 deletions src/darwin/Framework/CHIP/CHIPOnOff.mm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#import <Foundation/Foundation.h>

#import "CHIPCallbackBridge.h"
#import "CHIPDevice.h"
#import "CHIPDevice_Internal.h"
#import "CHIPOnOff.h"

Expand Down
1 change: 0 additions & 1 deletion src/darwin/Framework/CHIP/CHIPPersistentStorageDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* limitations under the License.
*/

#import "CHIPError.h"
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
Expand Down
5 changes: 2 additions & 3 deletions src/darwin/Framework/CHIP/CHIPQRCodeSetupPayloadParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
* limitations under the License.
*/

// module header
#import "CHIPSetupPayload.h"

#import <Foundation/Foundation.h>

@class CHIPSetupPayload;

NS_ASSUME_NONNULL_BEGIN

@interface CHIPQRCodeSetupPayloadParser : NSObject
Expand Down
1 change: 1 addition & 0 deletions src/darwin/Framework/CHIP/CHIPQRCodeSetupPayloadParser.mm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#import "CHIPQRCodeSetupPayloadParser.h"
#import "CHIPError.h"
#import "CHIPLogging.h"
#import "CHIPSetupPayload.h"

#import <setup_payload/QRCodeSetupPayloadParser.h>
#import <setup_payload/SetupPayload.h>
Expand Down
1 change: 0 additions & 1 deletion src/darwin/Framework/CHIP/CHIPSetupPayload.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* limitations under the License.
*/

#import "CHIPError.h"
#import <Foundation/Foundation.h>

#ifdef __cplusplus
Expand Down
1 change: 1 addition & 0 deletions src/darwin/Framework/CHIP/CHIPSetupPayload.mm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

#import "CHIPSetupPayload.h"
#import "CHIPError.h"
#import <setup_payload/SetupPayload.h>

@implementation CHIPOptionalQRCodeInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
// module headers
#import "CHIPManualSetupPayloadParser.h"
#import "CHIPQRCodeSetupPayloadParser.h"
#import "CHIPSetupPayload.h"

// additional includes
#import "CHIPError.h"
Expand Down

0 comments on commit f408bf6

Please sign in to comment.