Rev 457 | Rev 459 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
/*
* Copyright (C) 2024 by Andreas Theofilu <andreas@theosys.at>
*
* 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, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef TQINTERCOM_H
#define TQINTERCOM_H
#include <string>
typedef struct INTERCOM_t
{
std::string ip; // IP address of panel to connect to
long rxPort{0}; // Network port number for receiver
long txPort{0}; // Network port number for transmitter
int mode{0}; // The mode (0 = talk, 1 = listen, 2 = both)
}INTERCOM_t;
class TQIntercom
{
public:
TQIntercom();
TQIntercom(INTERCOM_t ic);
~TQIntercom();
void start();
void stop();
void setMicrophonLevel(int level);
void setSpeakerLevel(int level);
void setMute(bool mute);
void setIntercom(INTERCOM_t ic);
private:
INTERCOM_t mIntercom;
int mMicLevel{80};
int mSpkLevel{80};
bool mInitialized{false};
};
#endif // TQINTERCOM_H