//    tonalisa - software to look at overtone-structures
//    Copyright (C) 2016  Dominik Schmidt-Philipp
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program 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 General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
#include <QObject>
#include <QDebug>
#include <lo/lo.h>
#include <lo/lo_cpp.h>
#include "osc.h"

OSC::OSC(QObject *parent)
  : QObject(parent)
{
  m_server="localhost";
  m_port="9000";
  m_address="/default";
}

QString OSC::address() const {
  return m_address;
}
QString OSC::server() const {
  return m_server;
}
QString OSC::port() const {
  return m_port;
}

void OSC::setAddress(const QString &address) {
  if ( m_address != address) {
    m_address = address;
    emit addressChanged();
  }
}
void OSC::setServer(const QString &server) {
  if ( m_server != server ) {
    m_server = server;
    emit addressChanged();
  }
}
void OSC::setPort(const QString &port) {
  if ( m_port != port ) {
    m_port = port;
    emit portChanged();
  }
}

void OSC::sendFloat(float f) {
  lo::Address a("localhost", "9000");
}
