syntax = "proto3";

import "cmvr/api/common.proto";

package cmvr.api;

message MicState  {
    bool is_initialized = 1;
    bool is_running = 2;
    bool is_recording = 3;
    int32 volume = 4;
    string error_message = 5;
}
message GetMicStateCommand {
    message Request {
        CommandHeader.Request header = 1;
    }

    message Feedback {
        CommandHeader.Feedback header = 1;
        MicState  state = 2;
    }
}
message StartMicRecordingCommand {
    message Request {
        CommandHeader.Request header = 1;
        string file_path = 2;
    }
    message Feedback {
        CommandHeader.Feedback header = 1;
    }
}

message StopMicRecordingCommand {
    message Request {
        CommandHeader.Request header = 1;
    }

    message Feedback {
        CommandHeader.Feedback header = 1;
    }
}

message PauseMicRecordingCommand {
    message Request {
        CommandHeader.Request header = 1;
    }
    message Feedback {
        CommandHeader.Feedback header = 1;
    }
}

message ResumeMicRecordingCommand {
    message Request {
        CommandHeader.Request header = 1;
    }
    message Feedback {
        CommandHeader.Feedback header = 1;
    }
}

message SetMicPhoneVolumeCommand {
    message Request {
        CommandHeader.Request header = 1;
        int32 volume = 2;  // 音量值（0 ~ 100）
    }
    message Feedback {
        CommandHeader.Feedback header = 1;
    }
}

message GetMicPhoneVolumeCommand {
    message Request {
        CommandHeader.Request header = 1;
    }
    message Feedback {
        CommandHeader.Feedback header = 1;
        int32 volume = 2;  // 当前音量值
    }
}

