Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,27 @@ Implementation of Firebolt C++ Client.
For usage instructions of the API test application, see:

- [test/api_test_app/README.md](test/api_test_app/README.md)

## Test Runner

Use `run-all-test.sh` to build and run unit/component tests locally.

Examples:

- `./run-all-test.sh`
- `./run-unit-tests.sh --unit-filter "ActionsUTest.*"`
- `./run-component-tests.sh --component-filter "*Localization*"`

For the device websocket tunnel, use `setup-device-tunnel.sh`.
Before running it, export `DEVICE_SSH_USER`, `DEVICE_SSH_HOST`, and `DEVICE_SSH_PORT`.

## Lint

Use `lint.sh` to run local static analysis for C/C++ sources.

Examples:

- `./lint.sh`
- `./lint.sh --tidy-only`
- `./lint.sh --tidy-only --fix`
- `./lint.sh --cppcheck-only`
18 changes: 15 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,21 @@ while [[ ! -z $1 ]]; do
esac; shift
done

[[ ! -z $SYSROOT_PATH ]] || { echo "SYSROOT_PATH not set" >/dev/stderr; exit 1; }
[[ -e $SYSROOT_PATH ]] || { echo "SYSROOT_PATH not exist ($SYSROOT_PATH)" >/dev/stderr; exit 1; }
if [[ -n "$SYSROOT_PATH" ]]; then
[[ -e "$SYSROOT_PATH" ]] || { echo "SYSROOT_PATH not exist ($SYSROOT_PATH)" >/dev/stderr; exit 1; }
params+=" -DSYSROOT_PATH=$SYSROOT_PATH"
else
Comment thread
brendanobra marked this conversation as resolved.
Comment thread
brendanobra marked this conversation as resolved.
if $do_install; then
echo "--install requires --sysroot to be set; refusing to install without SYSROOT_PATH" >/dev/stderr
exit 1
fi
echo "SYSROOT_PATH not set; building without SYSROOT_PATH override"
fi

if [[ "$do_install" == true && "$bdir" == "build" && -z "${SYSROOT_PATH:-}" ]]; then
echo "Refusing --install without --sysroot to avoid host install into /usr" >&2
exit 1
fi

$cleanFirst && rm -rf $bdir

Expand All @@ -61,7 +74,6 @@ if [[ ! -e "$bdir" || -n "$@" ]]; then
command -v ccache >/dev/null 2>&1 && params+=" -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
cmake -B $bdir \
-DCMAKE_BUILD_TYPE=$buildType \
-DSYSROOT_PATH=$SYSROOT_PATH \
$params \
"$@" || exit $?
fi
Expand Down
56 changes: 56 additions & 0 deletions include/firebolt/actions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* Copyright 2026 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
//
// ============================================================================
// AUTO-GENERATED by fb-gen — DO NOT EDIT
// ============================================================================
Comment thread
brendanobra marked this conversation as resolved.
#ifndef FIREBOLT_ACTIONS_H
#define FIREBOLT_ACTIONS_H

#include <firebolt/types.h>
#include <functional>
#include <optional>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>

namespace Firebolt::Actions
{

class IActions
{
public:
virtual ~IActions() = default;

virtual Result<void> intent(const std::string& intent) const = 0;

virtual Result<SubscriptionId> subscribeOnIntent(std::function<void(const std::string&)>&& notification) = 0;
virtual Result<SubscriptionId> subscribeOnIntentChanged(std::function<void(const std::string&)>&& notification)
{
return subscribeOnIntent(std::move(notification));
Comment thread
brendanobra marked this conversation as resolved.
Comment thread
brendanobra marked this conversation as resolved.
}

virtual Result<void> unsubscribe(SubscriptionId id) = 0;
virtual void unsubscribeAll() = 0;

}; // class IActions

} // namespace Firebolt::Actions

#endif // FIREBOLT_ACTIONS_H
8 changes: 8 additions & 0 deletions include/firebolt/firebolt.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#pragma once

#include "firebolt/accessibility.h"
#include "firebolt/actions.h"
Comment thread
brendanobra marked this conversation as resolved.
#include "firebolt/advertising.h"
#include "firebolt/client_export.h"
#include "firebolt/device.h"
Expand Down Expand Up @@ -161,5 +162,12 @@ class FIREBOLTCLIENT_EXPORT IFireboltAccessor
* @return Reference to TextToSpeech interface
*/
virtual TextToSpeech::ITextToSpeech& TextToSpeechInterface() = 0;

/**
* @brief Returns instance of Actions interface
*
* @return Reference to Actions interface
*/
virtual Actions::IActions& ActionsInterface() = 0;
};
} // namespace Firebolt
Loading
Loading