//
// Aspia Project
// Copyright (C) 2016-2024 Dmitry Chapyshev <dmitry@aspia.ru>
//
// 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 <https://www.gnu.org/licenses/>.
//

syntax = "proto3";

option optimize_for = LITE_RUNTIME;

package proto;

message TextChatStatus
{
    enum Status
    {
        STATUS_UNKNOWN           = 0;
        STATUS_STARTED           = 1;
        STATUS_STOPPED           = 2;
        STATUS_TYPING            = 3;
        STATUS_USER_DISCONNECTED = 4;
        STATUS_USER_CONNECTED    = 5;
    }

    int64 timestamp = 1;
    string source   = 2;
    string target   = 3;
    Status status   = 4;
}

message TextChatMessage
{
    int64 timestamp = 1;
    string source   = 2;
    string target   = 3;
    string text     = 4;
}

message TextChat
{
    TextChatStatus chat_status   = 1;
    TextChatMessage chat_message = 2;
}
