#ifndef CHANNELMESSAGE_H
#define CHANNELMESSAGE_H

#include <QObject>
#include <QDebug>
#include <QJsonArray>

class ChannelMessage : public QObject
{
    Q_OBJECT
public:
    explicit ChannelMessage(QObject *parent = nullptr);
    virtual ~ChannelMessage();
public:
    Q_INVOKABLE void sendMessageFromJs(const QString &msgHead, const QString &message);
    Q_INVOKABLE void clearMessageFromJs();
    Q_INVOKABLE void getMeetingList();
    Q_INVOKABLE void saveMessageList();
    Q_INVOKABLE void getMessageList();

signals:
    void sigMessageFromJs(const QString &msgHead, const QString &message);
    void sigClearFromJs();
    void sigUpdateReply(const QString &msgHead, const QString &message);
    void sigStopReply();
    void sigSaveMessageList();
    void sigGetMessageList();
    //一段录音
    void sigStartRecord();
    void sigStopRecord();
    //实时录音
    void sigStartRuntime(QString lan, QString tartget);
    void sigStopRuntime();
    //语音听写
    void sigClearDictation();
    void sigCopyDictation();
    //会议录音
    void sigStartMeeting();
    void sigPauseMeeting();
    void sigStopMeeting();

    void sigRename(QString originalName);
    void sigMeetingList(QString str);

public slots:
    void updateReply(const QString &msgHead, const QString &message);
    void stopReply();

    //web接口
    void startVoiceInput();
    void stopVoiceInput();

    void startRuntime(QString lan, QString tartget);
    void stopRuntime();

    //语音听写
    void clearDictation();
    void copyDictation();

    void startMeeting();
    void pauseMeeting();
    void stopMeeting();
    void editName(QString originalName);
    void openMeetingFile(QString path);
    void deleteMeetingFile(QString path);

    //获取会议记录文件生成列表


};

#endif // CHANNELMESSAGE_H
