mumlib/include/mumlib.hpp

47 lines
917 B
C++
Raw Normal View History

2015-10-25 14:40:16 +01:00
#pragma once
#include "mumlib/Callback.hpp"
#include <boost/asio.hpp>
#include <boost/noncopyable.hpp>
#include <string>
#include <mumlib/enums.hpp>
namespace mumlib {
using namespace std;
using namespace boost::asio;
class MumlibException : public runtime_error {
public:
MumlibException(string message) : runtime_error(message) { }
};
struct _Mumlib_Private;
class Mumlib : boost::noncopyable {
public:
2015-10-27 23:31:45 +01:00
Mumlib(Callback &callback);
2015-10-25 14:40:16 +01:00
2015-10-27 23:31:45 +01:00
Mumlib(Callback &callback, io_service &ioService);
2015-10-25 14:40:16 +01:00
virtual ~Mumlib();
2015-10-25 14:40:16 +01:00
void connect(string host, int port, string user, string password);
void disconnect();
void run();
ConnectionState getConnectionState();
void sendAudioData(int16_t *pcmData, int pcmLength);
2015-10-30 02:15:02 +01:00
void sendTextMessage(std::string message);
2015-10-25 14:40:16 +01:00
private:
_Mumlib_Private *impl;
};
}