mirror of
https://github.com/zoriya/react-native-omni.git
synced 2026-08-05 21:58:54 +00:00
71 lines
1.9 KiB
C++
Generated
71 lines
1.9 KiB
C++
Generated
///
|
|
/// HybridOmniViewSpec.hpp
|
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
/// https://github.com/mrousavy/nitro
|
|
/// Copyright © Marc Rousavy @ Margelo
|
|
///
|
|
|
|
#pragma once
|
|
|
|
#if __has_include(<NitroModules/HybridObject.hpp>)
|
|
#include <NitroModules/HybridObject.hpp>
|
|
#else
|
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
#endif
|
|
|
|
// Forward declaration of `HybridOmniPlayerSpec` to properly resolve imports.
|
|
namespace margelo::nitro::omni { class HybridOmniPlayerSpec; }
|
|
|
|
#include <memory>
|
|
#include "HybridOmniPlayerSpec.hpp"
|
|
#include <optional>
|
|
|
|
namespace margelo::nitro::omni {
|
|
|
|
using namespace margelo::nitro;
|
|
|
|
/**
|
|
* An abstract base class for `OmniView`
|
|
* Inherit this class to create instances of `HybridOmniViewSpec` in C++.
|
|
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
|
* @example
|
|
* ```cpp
|
|
* class HybridOmniView: public HybridOmniViewSpec {
|
|
* public:
|
|
* HybridOmniView(...): HybridObject(TAG) { ... }
|
|
* // ...
|
|
* };
|
|
* ```
|
|
*/
|
|
class HybridOmniViewSpec: public virtual HybridObject {
|
|
public:
|
|
// Constructor
|
|
explicit HybridOmniViewSpec(): HybridObject(TAG) { }
|
|
|
|
// Destructor
|
|
~HybridOmniViewSpec() override = default;
|
|
|
|
public:
|
|
// Properties
|
|
virtual std::shared_ptr<HybridOmniPlayerSpec> getPlayer() = 0;
|
|
virtual void setPlayer(const std::shared_ptr<HybridOmniPlayerSpec>& player) = 0;
|
|
virtual std::optional<bool> getAutoplay() = 0;
|
|
virtual void setAutoplay(std::optional<bool> autoplay) = 0;
|
|
virtual std::optional<bool> getAutoPip() = 0;
|
|
virtual void setAutoPip(std::optional<bool> autoPip) = 0;
|
|
|
|
public:
|
|
// Methods
|
|
|
|
|
|
protected:
|
|
// Hybrid Setup
|
|
void loadHybridMethods() override;
|
|
|
|
protected:
|
|
// Tag for logging
|
|
static constexpr auto TAG = "OmniView";
|
|
};
|
|
|
|
} // namespace margelo::nitro::omni
|