GCC Code Coverage Report


Directory: ./
File: playlist/PlaylistEntryCommand.h
Date: 2026-10-29 08:11:58
Exec Total Coverage
Lines: 0 1 0.0%
Functions: 0 1 0.0%
Branches: 0 4 0.0%

Line Branch Exec Source
1 #pragma once
2 /*
3 * This file is part of the Falcon Player (FPP) and is Copyright (C)
4 * 2013-2022 by the Falcon Player Developers.
5 *
6 * The Falcon Player (FPP) is free software, and is covered under
7 * multiple Open Source licenses. Please see the included 'LICENSES'
8 * file for descriptions of what files are covered by each license.
9 *
10 * This source file is covered under the LGPL v2.1 as described in the
11 * included LICENSE.LGPL file.
12 */
13
14 #include <string>
15 #include "fpp-json.h"
16 #include <vector>
17
18 #include "PlaylistEntryBase.h"
19 #include "commands/Commands.h"
20
21 class PlaylistEntryCommand : public PlaylistEntryBase {
22 public:
23 PlaylistEntryCommand(Playlist* playlist, PlaylistEntryBase* parent = NULL);
24 virtual ~PlaylistEntryCommand();
25
26 virtual int Init(Json::Value& config) override;
27
28 virtual int StartPlaying(void) override;
29 virtual int Process(void) override;
30 virtual int Stop(void) override;
31
32 virtual void Dump(void) override;
33
34 virtual Json::Value GetConfig(void) override;
35
36 // The command has run to completion. A completed command entry is only
37 // marked finished by the NEXT Process() call, so this is what tells a
38 // caller that has no next call coming (a restart) that the entry's work
39 // is already done.
40 ✗ bool CommandDone() { return m_result && m_result->isDone(); }
41
42 private:
43 Json::Value m_command;
44 std::unique_ptr<Command::Result> m_result;
45 };
46