Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy/JsonGenerator warning fixes #319

Merged
merged 6 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ find_package(WPEFramework)
set(INTERFACES_PATTERNS "I*.h" CACHE STRING "Patterns matching files for which stubs should be generated")
set(JSONRPC_PATTERNS "*.json" CACHE STRING "Patterns matching files for which json stubs should be generated")

file(GLOB EXCLUDED_FILES
"${CMAKE_SOURCE_DIR}/interfaces/ICommand.h"
"${CMAKE_SOURCE_DIR}/interfaces/ICompositionBuffer.h"
"${CMAKE_SOURCE_DIR}/interfaces/IDRM.h"
"${CMAKE_SOURCE_DIR}/interfaces/IExternalBase.h"
)

if(ENABLE_STRICT_COMPILER_SETTINGS)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
message(FATAL_ERROR "Compiling with Clang")
Expand Down
5 changes: 3 additions & 2 deletions definitions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ find_package(${NAMESPACE}PrivilegedRequest QUIET)
set(Target ${NAMESPACE}${PROJECT_NAME})

separate_arguments(JSONRPC_PATTERNS)
list(TRANSFORM JSONRPC_PATTERNS PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/../jsonrpc/")
list(TRANSFORM JSONRPC_PATTERNS PREPEND "${CMAKE_SOURCE_DIR}/jsonrpc/")
file(GLOB JSON_FILE ${JSONRPC_PATTERNS})

separate_arguments(INTERFACES_PATTERNS)
list(TRANSFORM INTERFACES_PATTERNS PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/")
list(TRANSFORM INTERFACES_PATTERNS PREPEND "${CMAKE_SOURCE_DIR}/interfaces/")
file(GLOB INTERFACE_FILE ${INTERFACES_PATTERNS})
list(REMOVE_ITEM INTERFACE_FILE ${EXCLUDED_FILES})

set(PUBLIC_HEADERS "definitions.h" "ValuePoint.h")

Expand Down
2 changes: 1 addition & 1 deletion interfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ endif()

separate_arguments(INTERFACES_PATTERNS)
file(GLOB INTERFACES_HEADERS ${INTERFACES_PATTERNS})

list(REMOVE_ITEM INTERFACES_HEADERS ${EXCLUDED_FILES})
ProxyStubGenerator(INPUT "${INTERFACES_HEADERS}" OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/generated" INCLUDE_PATH ${GENERATOR_SEARCH_PATH})

file(GLOB JSON_HEADERS json/*.h)
Expand Down
10 changes: 5 additions & 5 deletions interfaces/IAVSClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
namespace WPEFramework {
namespace Exchange {

// @json @uncompliant:collapsed
// @json 1.0.0 @uncompliant:collapsed
struct EXTERNAL IAVSController : virtual public Core::IUnknown {
enum { ID = ID_AVSCONTROLLER };

Expand All @@ -39,21 +39,21 @@ namespace Exchange {
SPEAKING
};

/// @brief notifies about dialogue state changes
/// @param state The new state (e.g. SPEAKING)
/// @brief Notifies about dialogue state changes
/// @param state: The new state (e.g. SPEAKING)
virtual void DialogueStateChange(const dialoguestate state) = 0;
};

virtual void Register(INotification* sink) = 0;
virtual void Unregister(const INotification* sink) = 0;

/// @brief Mutes the audio output of AVS
/// @param mute Mute or umute (e.g. true)
/// @param mute: Mute or umute (e.g. true)
/// @retval ERROR_GENERAL when there is a fatal error or authorisation is not possible
virtual uint32_t Mute(const bool muted) = 0;

/// @brief Starts or stops the voice recording, skipping keyword detection
/// @param start Start or stop voice recording (e.g. true)
/// @param start: Start or stop voice recording (e.g. true)
/// @retval ERROR_GENERAL when there is a fatal error or authorisation is not possible
virtual uint32_t Record(const bool started) = 0;
};
Expand Down
6 changes: 3 additions & 3 deletions interfaces/IAmazonPrime.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
namespace WPEFramework {
namespace Exchange {

// @json @uncompliant:collapsed
// @json 1.0.0 @uncompliant:collapsed
struct EXTERNAL IAmazonPrime : virtual public Core::IUnknown {

enum { ID = ID_AMAZONPRIME };
Expand All @@ -33,15 +33,15 @@ namespace Exchange {
enum { ID = ID_AMAZONPRIME_NOTIFICATION };

// @brief Receive a message from the generic message bus
// @param messsage the message that was received.
// @param messsage: The message that was received.
virtual void Receive(const string& message) = 0;
};

virtual void Register(IAmazonPrime::INotification* ignition) = 0;
virtual void Unregister(IAmazonPrime::INotification* ignition) = 0;

// @brief Send a message over the message bus to ignition
// @param messsage the message to send according the amazon spec found
// @param messsage: The message to send according the amazon spec found
// in the parter portal.
virtual uint32_t Send(const string& message) = 0;
};
Expand Down
12 changes: 6 additions & 6 deletions interfaces/IApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
namespace WPEFramework {
namespace Exchange {

// @json @uncompliant:collapsed
// @json 1.0.0 @uncompliant:collapsed
struct EXTERNAL IApplication : virtual public Core::IUnknown {

enum { ID = ID_APPLICATION };
Expand All @@ -37,7 +37,7 @@ namespace Exchange {
~INotification() override = default;

/* @brief Application visibility changes */
/* @param hidden Denotes if application is currently hidden */
/* @param hidden: Denotes if application is currently hidden */
virtual void VisibilityChange(const bool hidden) = 0;
};

Expand Down Expand Up @@ -82,17 +82,17 @@ namespace Exchange {
virtual void Unregister(INotification* sink) = 0;

// @brief Resets application data
// @param type Type of reset to perform
// @param type: Type of reset to perform
virtual uint32_t Reset(const resettype type) = 0;

// @property
// @brief Application-specific identification string
// @param id Identifier string
// @param id: Identifier string
virtual uint32_t Identifier(string& id /* @out */) const = 0;

// @property
// @brief URI of the associated application-specific content
// @param link Content URI (e.g. https://youtube.com)
// @param link: Content URI (e.g. https://youtube.com)
virtual uint32_t ContentLink(const string& link) = 0;

// @property
Expand All @@ -107,7 +107,7 @@ namespace Exchange {

// @property
// @brief Current application user interface language
// @param language Language string as per RFC5646 (e.g. en)
// @param language: Language string as per RFC5646 (e.g. en)
virtual uint32_t Language(string& language /* @out */) const = 0;
virtual uint32_t Language(const string&) = 0;
};
Expand Down
26 changes: 14 additions & 12 deletions interfaces/IBluetoothAudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,21 @@ namespace Exchange {
};

struct CodecProperties {
audiocodec Codec /* @brief Audio codec used */ ;
string /* @opaque */ Settings /* @brief Codec-specific audio quality preset, compression profile, etc */ ;
audiocodec Codec /* @brief Audio codec used */;
string /* @opaque */ Settings /* @brief Codec-specific audio quality preset, compression profile, etc */;
};

struct DRMProperties {
drmscheme DRM /* @brief Content protection scheme used */ ;
string /* @opaque */ Settings /* @brief DRM-specific content protection level, encoding rules, etc */ ;
drmscheme DRM /* @brief Content protection scheme used */;
string /* @opaque */ Settings /* @brief DRM-specific content protection level, encoding rules, etc */;
};

struct StreamProperties {
uint32_t SampleRate /* @brief Sample rate in Hz (e.g. 44100) */ ;
uint32_t BitRate /* @brief Target bitrate in bits per second (eg. 320000) */ ;
uint8_t Channels /* @brief Number of audio channels (e.g. 2) */ ;
uint8_t Resolution /* @brief Sampling resolution in bits per sample (e.g. 16) */ ;
bool IsResampled /* @brief Indicates if the source stream is being resampled by the stack to match sink capabilities */ ;
uint32_t SampleRate /* @brief Sample rate in Hz (e.g. 44100) */;
uint32_t BitRate /* @brief Target bitrate in bits per second (eg. 320000) */;
uint8_t Channels /* @brief Number of audio channels (e.g. 2) */;
uint8_t Resolution /* @brief Sampling resolution in bits per sample (e.g. 16) */;
bool IsResampled /* @brief Indicates if the source stream is being resampled by the stack to match sink capabilities */;
};

struct EXTERNAL IStream : virtual public Core::IUnknown {
Expand Down Expand Up @@ -117,13 +117,14 @@ namespace Exchange {
enum { ID = ID_BLUETOOTHAUDIO_SINK_CALLBACK };

// @brief Signals audio sink state change
// @param state: Changed BluetoothAudio State
virtual void StateChanged(const IBluetoothAudio::state state) = 0;
};

virtual Core::hresult Callback(ICallback* callback) = 0;

// @brief Assigns a Bluetooth sink device for audio playback
// @param address Address of the bluetooth device to assign
// @param address: Address of the bluetooth device to assign
// @retval ERROR_BAD_REQUEST Device address value is invalid
// @retval ERROR_ALREADY_CONNECTED A sink device is already assigned
virtual Core::hresult Assign(const string& address) = 0;
Expand All @@ -148,7 +149,7 @@ namespace Exchange {

// @property
// @brief Latency of the audio sink device
// @param latency Audio latency in milliseconds (e.g. 20)
// @param latency: Audio latency in milliseconds (e.g. 20)
// @retval ERROR_BAD_REQUEST Latency value is invalid
virtual Core::hresult Latency(const int16_t latency) = 0;
virtual Core::hresult Latency(int16_t& latency /* @out */) const = 0;
Expand All @@ -174,7 +175,7 @@ namespace Exchange {
virtual Core::hresult DRM(DRMProperties& properties /* @out */) const = 0;

// @property
// @brief v of the currently transmitted audio stream
// @brief Properties of the currently transmitted audio stream
// @retval ERROR_ILLEGAL_STATE The sink device currently is not connected or not yet configured
virtual Core::hresult Stream(StreamProperties& properties /* @out */) const = 0;
};
Expand Down Expand Up @@ -210,6 +211,7 @@ namespace Exchange {
enum { ID = ID_BLUETOOTHAUDIO_SOURCE_CALLBACK };

// @brief Signals audio source state change
// @param state: Changed BluetoothAudio State
virtual void StateChanged(const IBluetoothAudio::state state) = 0;
};

Expand Down
Loading