3 * Copyright (C) 2013-2014 Filipe Coelho <falktx@falktx.com>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License, or any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * For a full copy of the GNU General Public License see the doc/GPL.txt file.
18 #ifndef CARLA_EXTERNAL_UI_HPP_INCLUDED
19 #define CARLA_EXTERNAL_UI_HPP_INCLUDED
21 #include "CarlaPipeUtils.hpp"
22 #include "CarlaString.hpp"
24 // -----------------------------------------------------------------------
26 class CarlaExternalUI
: public CarlaPipeServer
36 CarlaExternalUI() noexcept
42 ~CarlaExternalUI() /*noexcept*/ override
44 CARLA_SAFE_ASSERT_INT(fUiState
== UiNone
, fUiState
);
47 UiState
getAndResetUiState() noexcept
49 const UiState
uiState(fUiState
);
54 void setData(const char* const filename
, const char* const arg1
, const char* const arg2
) noexcept
61 void setData(const char* const filename
, const double sampleRate
, const char* const uiTitle
) noexcept
64 fArg1
= CarlaString(sampleRate
);
68 bool startPipeServer(const bool show
= true) noexcept
70 if (CarlaPipeServer::startPipeServer(fFilename
, fArg1
, fArg2
))
81 // returns true if msg was handled
82 bool msgReceived(const char* const msg
) noexcept override
84 if (std::strcmp(msg
, "exiting") == 0)
95 CarlaString fFilename
;
100 CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaExternalUI
)
103 // -----------------------------------------------------------------------
105 #endif // CARLA_EXTERNAL_UI_HPP_INCLUDED