mirror of
https://github.com/zoriya/react-native-omni.git
synced 2026-08-06 06:07:30 +00:00
84 lines
2.6 KiB
C++
Generated
84 lines
2.6 KiB
C++
Generated
///
|
|
/// HybridOmniPlayerPropsSpec.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 `VideoSrc` to properly resolve imports.
|
|
namespace margelo::nitro::omni { struct VideoSrc; }
|
|
// Forward declaration of `Subtitle` to properly resolve imports.
|
|
namespace margelo::nitro::omni { struct Subtitle; }
|
|
// Forward declaration of `Metadata` to properly resolve imports.
|
|
namespace margelo::nitro::omni { struct Metadata; }
|
|
// Forward declaration of `MixAudioMode` to properly resolve imports.
|
|
namespace margelo::nitro::omni { enum class MixAudioMode; }
|
|
|
|
#include "VideoSrc.hpp"
|
|
#include <vector>
|
|
#include <optional>
|
|
#include "Subtitle.hpp"
|
|
#include "Metadata.hpp"
|
|
#include "MixAudioMode.hpp"
|
|
|
|
namespace margelo::nitro::omni {
|
|
|
|
using namespace margelo::nitro;
|
|
|
|
/**
|
|
* An abstract base class for `OmniPlayerProps`
|
|
* Inherit this class to create instances of `HybridOmniPlayerPropsSpec` in C++.
|
|
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
|
* @example
|
|
* ```cpp
|
|
* class HybridOmniPlayerProps: public HybridOmniPlayerPropsSpec {
|
|
* public:
|
|
* HybridOmniPlayerProps(...): HybridObject(TAG) { ... }
|
|
* // ...
|
|
* };
|
|
* ```
|
|
*/
|
|
class HybridOmniPlayerPropsSpec: public virtual HybridObject {
|
|
public:
|
|
// Constructor
|
|
explicit HybridOmniPlayerPropsSpec(): HybridObject(TAG) { }
|
|
|
|
// Destructor
|
|
~HybridOmniPlayerPropsSpec() override = default;
|
|
|
|
public:
|
|
// Properties
|
|
virtual std::vector<VideoSrc> getSrc() = 0;
|
|
virtual void setSrc(const std::vector<VideoSrc>& src) = 0;
|
|
virtual std::optional<double> getStartTime() = 0;
|
|
virtual void setStartTime(std::optional<double> startTime) = 0;
|
|
virtual std::vector<Subtitle> getSubtitles() = 0;
|
|
virtual void setSubtitles(const std::vector<Subtitle>& subtitles) = 0;
|
|
virtual std::optional<Metadata> getMetadata() = 0;
|
|
virtual void setMetadata(const std::optional<Metadata>& metadata) = 0;
|
|
virtual std::optional<MixAudioMode> getMixAudio() = 0;
|
|
virtual void setMixAudio(std::optional<MixAudioMode> mixAudio) = 0;
|
|
|
|
public:
|
|
// Methods
|
|
|
|
|
|
protected:
|
|
// Hybrid Setup
|
|
void loadHybridMethods() override;
|
|
|
|
protected:
|
|
// Tag for logging
|
|
static constexpr auto TAG = "OmniPlayerProps";
|
|
};
|
|
|
|
} // namespace margelo::nitro::omni
|