/usr/include/faust/gui/HTTPDControler.h is in faust-common 0.9.95~repack1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | /*
Faust Project
Copyright (C) 2012 Grame
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Grame Research Laboratory, 9 rue du Garet, 69001 Lyon - France
research@grame.fr
*/
#ifndef __HTTPDControler__
#define __HTTPDControler__
#include <string>
#include <map>
namespace httpdfaust
{
class HTTPDSetup;
class JSONDesc;
class FaustFactory;
class jsonfactory;
class htmlfactory;
//--------------------------------------------------------------------------
/*!
\brief the main Faust HTTPD Lib API
The HTTPDControler is essentially a glue between the memory representation (in charge of the FaustFactory),
and the network services (in charge of HTTPDSetup).
*/
class HTTPDControler
{
int fTCPPort; // the tcp port number
FaustFactory* fFactory; // a factory to build the memory representation
jsonfactory* fJson;
htmlfactory* fHtml;
HTTPDSetup* fHttpd; // the network manager
std::string fHTML; // the corresponding HTML page
std::map<std::string, std::string> fCurrentMeta; // the current meta declarations
bool fInit;
public:
/*
base udp port is chosen in an unassigned range from IANA PORT NUMBERS (last updated 2011-01-24)
see at http://www.iana.org/assignments/port-numbers
5507-5552 Unassigned
*/
enum { kTCPBasePort = 5510};
HTTPDControler(int argc, char *argv[], const char* applicationname, bool init = true);
virtual ~HTTPDControler();
//--------------------------------------------------------------------------
// addnode, opengroup and closegroup are simply relayed to the factory
//--------------------------------------------------------------------------
template <typename C> void addnode(const char* type, const char* label, C* zone);
template <typename C> void addnode(const char* type, const char* label, C* zone, C min, C max);
template <typename C> void addnode(const char* type, const char* label, C* zone, C init, C min, C max, C step);
void declare(const char* key, const char* val ) { fCurrentMeta[key] = val; }
void opengroup(const char* type, const char* label);
void closegroup();
//--------------------------------------------------------------------------
void run(); // start the httpd server
void stop(); // stop the httpd server
int getTCPPort() { return fTCPPort; }
std::string getJSON();
void setInputs(int numInputs);
void setOutputs(int numOutputs);
static float version(); // the Faust httpd library version number
static const char* versionstr(); // the Faust httpd library version number as a string
};
}
#endif
|