avs-device-sdk/CapabilityAgents/Alerts/include/Alerts/Reminder.h

78 lines
2.7 KiB
C
Raw Normal View History

Version 1.1.0 alexa-client-sdk - Changes in this update: - Better GStreamer error reporting. MediaPlayer used to only report `MEDIA_ERROR_UNKNOWN`, now reports more specific errors as defined in `ErrorType.h`. - Codebase has been formatted for easier reading. - `DirectiveRouter::removeDirectiveHandler()` signature changed and now returns a bool indicating if given handler should be successfully removed or not. - Cleanup of raw and shared pointers in the creation of `Transport` objects. - `HTTP2Stream`s now have IDs assigned as they are acquired as opposed to created, making associated logs easier to interpret. - `AlertsCapabilityAgent` has been refactored. - Alert management has been factored out into an `AlertScheduler` class. - Creation of Reminder (implements Alert) class. - Added new capability agent for `PlaybackController` with unit tests. - Added Settings interface with unit tests. - Return type of `getOffsetInMilliseconds()` changed from `int64_t` to `std::chronology::milliseconds`. - Added `AudioPlayer` unit tests. - Added teardown for all Integration tests except Alerts. - Implemented PlaylistParser. - Bug fixes: - AIP getting stuck in `LISTENING` or `THINKING` and refusing user input on network outage. - SampleApp crashing if running for 5 minutes after network disconnect. - Issue where on repeated user barge-ins, `AudioPlayer` would not pause. Specifically, the third attempt to “Play iHeartRadio” would not result in currently-playing music pausing. - Utterances being ignored after particularly long TTS. - GStreamer errors cropping up on SampleApp exit as a result of accessing the pipeline before it’s been setup. - Crashing when playing one URL after another. - Buffer overrun in Alerts Renderer. - [SampleApp crashing when issuing "Alexa skip" command with iHeartRadio.](https://github.com/alexa/avs-device-sdk/issues/153) - [`HTTP2Transport` network thread triggering a join on itself.](https://github.com/alexa/avs-device-sdk/issues/127) - [`HTTP2Stream` request handling truncating exception messages.](https://github.com/alexa/avs-device-sdk/issues/67) - [`AudioPlayer` was attempting an incorrect state transition from `STOPPED` to `PLAYING` through a `playbackResumed`.](https://github.com/alexa/avs-device-sdk/issues/138)
2017-10-02 22:59:05 +00:00
/*
* Reminder.h
*
* Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* or in the "license" file accompanying this file. This file 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.
*/
#ifndef ALEXA_CLIENT_SDK_CAPABILITY_AGENTS_ALERTS_INCLUDE_ALERTS_REMINDER_H_
#define ALEXA_CLIENT_SDK_CAPABILITY_AGENTS_ALERTS_INCLUDE_ALERTS_REMINDER_H_
#include "Alerts/Alert.h"
namespace alexaClientSDK {
namespace capabilityAgents {
namespace alerts {
/**
* A reminder class. This represents an alert which the user wishes to activate at a specific point in time,
* which they specify as that absolute time point, rather than an offset from the current time.
*
* The user expectation is that the activation of the reminder will include custom assets (if the device is connected
* to the internet), such as Alexa telling the user something specific with respect to the reminder being set.
*
* Usage example:
* "Alexa, remind me to walk the dog at 10am".
* 10am : Alexa will say "This is your 10am reminder to walk the dog."
*/
class Reminder : public Alert {
public:
/// String representation of this type.
static const std::string TYPE_NAME;
/**
* A static function to set the default audio file path for this type of alert.
*
* @note This function should only be called at initialization, before any objects have been instantiated.
*
* @param filePath The path to the audio file.
*/
static void setDefaultAudioFilePath(const std::string& filePath);
/**
* A static function to set the short audio file path for this type of alert.
*
* @note This function should only be called at initialization, before any objects have been instantiated.
*
* @param filePath The path to the audio file.
*/
static void setDefaultShortAudioFilePath(const std::string& filePath);
std::string getDefaultAudioFilePath() const override;
std::string getDefaultShortAudioFilePath() const override;
std::string getTypeName() const override;
private:
/// The class-level audio file path.
static std::string m_defaultAudioFilePath;
/// The class-level short audio file path.
static std::string m_defaultShortAudioFilePath;
};
} // namespace alerts
} // namespace capabilityAgents
} // namespace alexaClientSDK
#endif // ALEXA_CLIENT_SDK_CAPABILITY_AGENTS_ALERTS_INCLUDE_ALERTS_REMINDER_H_