Skip to content

Commit

Permalink
tv-casting-app: Removing some zzz_generated / darwin dependencies (#2…
Browse files Browse the repository at this point in the history
…6762)

* tv-casting-app: Removing some zzz_generated dependencies

* tv-casting-app: Removing dependency on src/darwin/Framework/CHIP

* Removed zzz_generated/darwin dir and reference from zap_regen_all.py
  • Loading branch information
sharadb-amazon authored and pull[bot] committed Dec 8, 2023
1 parent 188c229 commit 2614145
Show file tree
Hide file tree
Showing 19 changed files with 11 additions and 3,353 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -415,19 +415,14 @@
"$(CHIP_ROOT)/src/lib",
"$(CHIP_ROOT)/src/app",
"$(CHIP_ROOT)/config/ios",
"$(CHIP_ROOT)/src/darwin/Framework/CHIP/",
"$(CHIP_ROOT)/src/app/util",
"$(CHIP_ROOT)/third_party/nlassert/repo/include",
"$(CHIP_ROOT)/third_party/nlio/repo/include",
"$(TEMP_DIR)/out/gen/include",
/* Compile time codegen would need this:
"$(TEMP_DIR)/out/gen/src/controller/data_model/zapgen/",
*/
"$(CHIP_ROOT)/zzz_generated/",
"$(CHIP_ROOT)/zzz_generated/app-common",
"$(CHIP_ROOT)/zzz_generated/controller-clusters",
/* darwin-specific bypassing compile time codegen for header inclusion */
"$(CHIP_ROOT)/zzz_generated/darwin/controller-clusters",
);
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand Down Expand Up @@ -503,19 +498,14 @@
"$(CHIP_ROOT)/src/lib",
"$(CHIP_ROOT)/src/app",
"$(CHIP_ROOT)/config/ios",
"$(CHIP_ROOT)/src/darwin/Framework/CHIP/",
"$(CHIP_ROOT)/src/app/util",
"$(CHIP_ROOT)/third_party/nlassert/repo/include",
"$(CHIP_ROOT)/third_party/nlio/repo/include",
"$(TEMP_DIR)/out/gen/include",
/* Compile time codegen would need this:
"$(TEMP_DIR)/out/gen/src/controller/data_model/zapgen/",
*/
"$(CHIP_ROOT)/zzz_generated/",
"$(CHIP_ROOT)/zzz_generated/app-common",
"$(CHIP_ROOT)/zzz_generated/controller-clusters",
/* darwin-specific bypassing compile time codegen for header inclusion */
"$(CHIP_ROOT)/zzz_generated/darwin/controller-clusters",
);
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "MediaReadBase.h"
#include "MediaSubscriptionBase.h"

#include <zap-generated/CHIPClusters.h>
#include <controller/CHIPCluster.h>

// SUBSCRIBER CLASSES
class VendorNameSubscriber : public MediaSubscriptionBase<chip::app::Clusters::ApplicationBasic::Attributes::VendorName::TypeInfo>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "MediaCommandBase.h"
#include "MediaSubscriptionBase.h"

#include <controller/CHIPCluster.h>
#include <functional>
#include <zap-generated/CHIPClusters.h>

// COMMAND CLASSES
class LaunchAppCommand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@

#include <app-common/zap-generated/cluster-objects.h>
#include <app/server/Server.h>
#include <controller/CHIPCluster.h>
#include <controller/CHIPCommissionableNodeController.h>
#include <functional>
#include <zap-generated/CHIPClientCallbacks.h>
#include <zap-generated/CHIPClusters.h>

constexpr chip::System::Clock::Seconds16 kCommissioningWindowTimeout = chip::System::Clock::Seconds16(3 * 60);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "MediaCommandBase.h"
#include "MediaSubscriptionBase.h"

#include <controller/CHIPCluster.h>
#include <functional>
#include <zap-generated/CHIPClusters.h>

// COMMAND CLASSES
class ChangeChannelCommand : public MediaCommandBase<chip::app::Clusters::Channel::Commands::ChangeChannel::Type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "MediaCommandBase.h"
#include "MediaSubscriptionBase.h"

#include <controller/CHIPCluster.h>
#include <functional>
#include <zap-generated/CHIPClusters.h>

// COMMAND CLASSES
class LaunchURLCommand : public MediaCommandBase<chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include "MediaCommandBase.h"

#include <controller/CHIPCluster.h>
#include <functional>
#include <zap-generated/CHIPClusters.h>

class SendKeyCommand : public MediaCommandBase<chip::app::Clusters::KeypadInput::Commands::SendKey::Type,
chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "MediaCommandBase.h"
#include "MediaSubscriptionBase.h"

#include <controller/CHIPCluster.h>
#include <functional>
#include <zap-generated/CHIPClusters.h>

// COMMAND CLASSES
class StepCommand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "MediaCommandBase.h"
#include "MediaSubscriptionBase.h"

#include <controller/CHIPCluster.h>
#include <functional>
#include <zap-generated/CHIPClusters.h>

// COMMAND CLASSES
class PlayCommand : public MediaCommandBase<chip::app::Clusters::MediaPlayback::Commands::Play::Type,
Expand Down
2 changes: 1 addition & 1 deletion examples/tv-casting-app/tv-casting-common/include/OnOff.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "MediaBase.h"
#include "MediaCommandBase.h"

#include <controller/CHIPCluster.h>
#include <functional>
#include <zap-generated/CHIPClusters.h>

// COMMAND CLASSES
class OnCommand : public MediaCommandBase<chip::app::Clusters::OnOff::Commands::On::Type, chip::app::DataModel::NullObjectType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "MediaCommandBase.h"
#include "MediaSubscriptionBase.h"

#include <controller/CHIPCluster.h>
#include <functional>
#include <zap-generated/CHIPClusters.h>

// COMMAND CLASSES
class NavigateTargetCommand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,7 @@ void CastingServer::ReadServerClusters(EndpointId endpointId)
}

// GetOperationalDeviceProxy only passes us a deviceProxy if we can get a SessionHandle.
chip::Controller::DescriptorCluster cluster(*deviceProxy->GetExchangeManager(), deviceProxy->GetSecureSession().Value(),
endpointId);
chip::Controller::ClusterBase cluster(*deviceProxy->GetExchangeManager(), deviceProxy->GetSecureSession().Value(), endpointId);

TargetEndpointInfo * endpointInfo = mActiveTargetVideoPlayerInfo.GetOrAddEndpoint(endpointId);

Expand Down
10 changes: 0 additions & 10 deletions scripts/tools/zap_regen_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,16 +352,6 @@ def getGlobalTemplatesTargets():

targets.append(ZAPGenerateTarget.MatterIdlTarget('src/controller/data_model/controller-clusters.zap', client_side=True))

# This generates app headers for darwin only, for easier/clearer include
# in .pbxproj files.
#
# TODO: These files can be code generated at compile time, we should figure
# out a path for this codegen to not be required.
targets.append(ZAPGenerateTarget(
'src/controller/data_model/controller-clusters.zap',
template="src/app/zap-templates/app-templates.json",
output_dir='zzz_generated/darwin/controller-clusters/zap-generated'))

return targets


Expand Down
Loading

0 comments on commit 2614145

Please sign in to comment.