Skip to content

Commit

Permalink
Run codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
erjiaqing committed Mar 3, 2021
1 parent 6f4e280 commit e6f39e9
Show file tree
Hide file tree
Showing 23 changed files with 258 additions and 226 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#import <Foundation/Foundation.h>

#include <lib/support/BytesData.h>

@class CHIPDevice;

typedef void (^ResponseHandler)(NSError * _Nullable error, NSDictionary * _Nullable values);
Expand Down Expand Up @@ -378,8 +380,8 @@ NS_ASSUME_NONNULL_BEGIN
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler;
- (void)commissioningComplete:(ResponseHandler)completionHandler;
- (void)setFabric:(char *)fabricId
fabricSecret:(char *)fabricSecret
- (void)setFabric:(chip::BytesData)fabricId
fabricSecret:(chip::BytesData)fabricSecret
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#import "gen/CHIPClustersObjc.h"

#include <controller/CHIPClusters.h>
#include <lib/support/BytesData.h>

using namespace ::chip;

Expand Down Expand Up @@ -3805,8 +3806,8 @@ - (void)commissioningComplete:(ResponseHandler)completionHandler
completionHandler([CHIPError errorForCHIPErrorCode:err], nil);
}
}
- (void)setFabric:(char *)fabricId
fabricSecret:(char *)fabricSecret
- (void)setFabric:(chip::BytesData)fabricId
fabricSecret:(chip::BytesData)fabricSecret
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler
Expand Down
2 changes: 2 additions & 0 deletions examples/bridge-app/bridge-common/gen/CHIPClustersObjc.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#import <Foundation/Foundation.h>

#include <lib/support/BytesData.h>

@class CHIPDevice;

typedef void (^ResponseHandler)(NSError * _Nullable error, NSDictionary * _Nullable values);
Expand Down
1 change: 1 addition & 0 deletions examples/bridge-app/bridge-common/gen/CHIPClustersObjc.mm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#import "gen/CHIPClustersObjc.h"

#include <controller/CHIPClusters.h>
#include <lib/support/BytesData.h>

using namespace ::chip;

Expand Down
11 changes: 9 additions & 2 deletions examples/chip-tool/commands/clusters/Commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,14 @@

#pragma once

#include <cstdint>

#include "ModelCommand.h"
#include "gen/CHIPClientCallbacks.h"
#include <controller/CHIPClusters.h>
#include <lib/support/BytesData.h>

using namespace chip;

static void OnDefaultSuccessResponse(void * context)
{
Expand Down Expand Up @@ -4978,8 +4983,10 @@ class GeneralCommissioningSetFabric : public ModelCommand

chip::Controller::GeneralCommissioningCluster cluster;
cluster.Associate(device, endpointId);
return cluster.SetFabric(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), reinterpret_cast<char *>(mFabricId),
reinterpret_cast<char *>(mFabricSecret), mBreadcrumb, mTimeoutMs);
return cluster.SetFabric(onSuccessCallback->Cancel(), onFailureCallback->Cancel(),
BytesData(reinterpret_cast<uint8_t *>(mFabricId), strlen(mFabricId)),
BytesData(reinterpret_cast<uint8_t *>(mFabricSecret), strlen(mFabricSecret)), mBreadcrumb,
mTimeoutMs);
}

private:
Expand Down
6 changes: 4 additions & 2 deletions examples/chip-tool/gen/CHIPClustersObjc.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#import <Foundation/Foundation.h>

#include <lib/support/BytesData.h>

@class CHIPDevice;

typedef void (^ResponseHandler)(NSError * _Nullable error, NSDictionary * _Nullable values);
Expand Down Expand Up @@ -378,8 +380,8 @@ NS_ASSUME_NONNULL_BEGIN
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler;
- (void)commissioningComplete:(ResponseHandler)completionHandler;
- (void)setFabric:(char *)fabricId
fabricSecret:(char *)fabricSecret
- (void)setFabric:(chip::BytesData)fabricId
fabricSecret:(chip::BytesData)fabricSecret
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler;
Expand Down
5 changes: 3 additions & 2 deletions examples/chip-tool/gen/CHIPClustersObjc.mm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#import "gen/CHIPClustersObjc.h"

#include <controller/CHIPClusters.h>
#include <lib/support/BytesData.h>

using namespace ::chip;

Expand Down Expand Up @@ -5104,8 +5105,8 @@ - (void)commissioningComplete:(ResponseHandler)completionHandler
completionHandler([CHIPError errorForCHIPErrorCode:err], nil);
}
}
- (void)setFabric:(char *)fabricId
fabricSecret:(char *)fabricSecret
- (void)setFabric:(chip::BytesData)fabricId
fabricSecret:(chip::BytesData)fabricSecret
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler
Expand Down
22 changes: 12 additions & 10 deletions examples/lighting-app/lighting-common/gen/CHIPClustersObjc.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#import <Foundation/Foundation.h>

#include <lib/support/BytesData.h>

@class CHIPDevice;

typedef void (^ResponseHandler)(NSError * _Nullable error, NSDictionary * _Nullable values);
Expand Down Expand Up @@ -91,38 +93,38 @@ NS_ASSUME_NONNULL_BEGIN
*/
@interface CHIPNetworkCommissioning : CHIPCluster

- (void)addThreadNetwork:(char *)operationalDataset
- (void)addThreadNetwork:(chip::BytesData)operationalDataset
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler;
- (void)addWiFiNetwork:(char *)ssid
credentials:(char *)credentials
- (void)addWiFiNetwork:(chip::BytesData)ssid
credentials:(chip::BytesData)credentials
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler;
- (void)disableNetwork:(char *)networkID
- (void)disableNetwork:(chip::BytesData)networkID
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler;
- (void)enableNetwork:(char *)networkID
- (void)enableNetwork:(chip::BytesData)networkID
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler;
- (void)getLastNetworkCommissioningResult:(uint32_t)timeoutMs completionHandler:(ResponseHandler)completionHandler;
- (void)removeNetwork:(char *)networkID
- (void)removeNetwork:(chip::BytesData)networkID
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler;
- (void)scanNetworks:(char *)ssid
- (void)scanNetworks:(chip::BytesData)ssid
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler;
- (void)updateThreadNetwork:(char *)operationalDataset
- (void)updateThreadNetwork:(chip::BytesData)operationalDataset
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler;
- (void)updateWiFiNetwork:(char *)ssid
credentials:(char *)credentials
- (void)updateWiFiNetwork:(chip::BytesData)ssid
credentials:(chip::BytesData)credentials
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler;
Expand Down
21 changes: 11 additions & 10 deletions examples/lighting-app/lighting-common/gen/CHIPClustersObjc.mm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#import "gen/CHIPClustersObjc.h"

#include <controller/CHIPClusters.h>
#include <lib/support/BytesData.h>

using namespace ::chip;

Expand Down Expand Up @@ -616,7 +617,7 @@ @implementation CHIPNetworkCommissioning
return &_cppCluster;
}

- (void)addThreadNetwork:(char *)operationalDataset
- (void)addThreadNetwork:(chip::BytesData)operationalDataset
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler
Expand All @@ -643,8 +644,8 @@ - (void)addThreadNetwork:(char *)operationalDataset
completionHandler([CHIPError errorForCHIPErrorCode:err], nil);
}
}
- (void)addWiFiNetwork:(char *)ssid
credentials:(char *)credentials
- (void)addWiFiNetwork:(chip::BytesData)ssid
credentials:(chip::BytesData)credentials
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler
Expand All @@ -671,7 +672,7 @@ - (void)addWiFiNetwork:(char *)ssid
completionHandler([CHIPError errorForCHIPErrorCode:err], nil);
}
}
- (void)disableNetwork:(char *)networkID
- (void)disableNetwork:(chip::BytesData)networkID
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler
Expand All @@ -697,7 +698,7 @@ - (void)disableNetwork:(char *)networkID
completionHandler([CHIPError errorForCHIPErrorCode:err], nil);
}
}
- (void)enableNetwork:(char *)networkID
- (void)enableNetwork:(chip::BytesData)networkID
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler
Expand Down Expand Up @@ -745,7 +746,7 @@ - (void)getLastNetworkCommissioningResult:(uint32_t)timeoutMs completionHandler:
completionHandler([CHIPError errorForCHIPErrorCode:err], nil);
}
}
- (void)removeNetwork:(char *)networkID
- (void)removeNetwork:(chip::BytesData)networkID
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler
Expand All @@ -771,7 +772,7 @@ - (void)removeNetwork:(char *)networkID
completionHandler([CHIPError errorForCHIPErrorCode:err], nil);
}
}
- (void)scanNetworks:(char *)ssid
- (void)scanNetworks:(chip::BytesData)ssid
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler
Expand All @@ -797,7 +798,7 @@ - (void)scanNetworks:(char *)ssid
completionHandler([CHIPError errorForCHIPErrorCode:err], nil);
}
}
- (void)updateThreadNetwork:(char *)operationalDataset
- (void)updateThreadNetwork:(chip::BytesData)operationalDataset
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler
Expand All @@ -824,8 +825,8 @@ - (void)updateThreadNetwork:(char *)operationalDataset
completionHandler([CHIPError errorForCHIPErrorCode:err], nil);
}
}
- (void)updateWiFiNetwork:(char *)ssid
credentials:(char *)credentials
- (void)updateWiFiNetwork:(chip::BytesData)ssid
credentials:(chip::BytesData)credentials
breadcrumb:(uint64_t)breadcrumb
timeoutMs:(uint32_t)timeoutMs
completionHandler:(ResponseHandler)completionHandler
Expand Down
2 changes: 2 additions & 0 deletions examples/lock-app/lock-common/gen/CHIPClustersObjc.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#import <Foundation/Foundation.h>

#include <lib/support/BytesData.h>

@class CHIPDevice;

typedef void (^ResponseHandler)(NSError * _Nullable error, NSDictionary * _Nullable values);
Expand Down
1 change: 1 addition & 0 deletions examples/lock-app/lock-common/gen/CHIPClustersObjc.mm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#import "gen/CHIPClustersObjc.h"

#include <controller/CHIPClusters.h>
#include <lib/support/BytesData.h>

using namespace ::chip;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#import <Foundation/Foundation.h>

#include <lib/support/BytesData.h>

@class CHIPDevice;

typedef void (^ResponseHandler)(NSError * _Nullable error, NSDictionary * _Nullable values);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#import "gen/CHIPClustersObjc.h"

#include <controller/CHIPClusters.h>
#include <lib/support/BytesData.h>

using namespace ::chip;

Expand Down
2 changes: 2 additions & 0 deletions examples/tv-app/tv-common/gen/CHIPClustersObjc.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#import <Foundation/Foundation.h>

#include <lib/support/BytesData.h>

@class CHIPDevice;

typedef void (^ResponseHandler)(NSError * _Nullable error, NSDictionary * _Nullable values);
Expand Down
1 change: 1 addition & 0 deletions examples/tv-app/tv-common/gen/CHIPClustersObjc.mm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#import "gen/CHIPClustersObjc.h"

#include <controller/CHIPClusters.h>
#include <lib/support/BytesData.h>

using namespace ::chip;

Expand Down
Loading

0 comments on commit e6f39e9

Please sign in to comment.