-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVampAlsaHost.hpp
43 lines (32 loc) · 989 Bytes
/
VampAlsaHost.hpp
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
#ifndef VAMPALSAHOST_HPP
#define VAMPALSAHOST_HPP
/*
Manage a set of pollable objects, do polling, and call the object when events occur.
*/
#include <set>
#include <vector>
#include <map>
#include <poll.h>
#include <errno.h>
#include <string>
#include <sstream>
#include <memory>
using std::string;
using std::istringstream;
using std::ostringstream;
// type that handles commands
typedef string (*CommandHandler) (string cmd, string connLabel);
class VampAlsaHost {
protected:
static string defaultOutputListener; // label of connection which will be automatically added as an outputListener to any new attached plugin
public:
static const unsigned MAX_CMD_STRING_LENGTH = 512; // size of buffer for receiving commands over TCP
VampAlsaHost();
~VampAlsaHost();
static string runCommand(string cmdString, string connLabel);
int run();
static double now(bool is_monotonic = false);
static const string commandHelp;
protected:
};
#endif // VAMPALSAHOST_HPP