<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT! (protoc-gen-twirp_php 0.15.0)
# source: livekit_room.proto

declare(strict_types=1);

namespace Livekit;

/**
 * Room service that can be performed on any node
 * they are Twirp-based HTTP req/responses
 *
 * Generated from protobuf service <code>livekit.RoomService</code>
 */
interface RoomService
{
    /**
     * Creates a room with settings. Requires `roomCreate` permission.
     * This method is optional; rooms are automatically created when clients connect to them for the first time.
     *
     * Generated from protobuf method <code>livekit.RoomService/CreateRoom</code>
     *
     * @throws \Twirp\Error
     */
    public function CreateRoom(array $ctx, \Livekit\CreateRoomRequest $req): \Livekit\Room;

    /**
     * List rooms that are active on the server. Requires `roomList` permission.
     *
     * Generated from protobuf method <code>livekit.RoomService/ListRooms</code>
     *
     * @throws \Twirp\Error
     */
    public function ListRooms(array $ctx, \Livekit\ListRoomsRequest $req): \Livekit\ListRoomsResponse;

    /**
     * Deletes an existing room by name or id. Requires `roomCreate` permission.
     * DeleteRoom will disconnect all participants that are currently in the room.
     *
     * Generated from protobuf method <code>livekit.RoomService/DeleteRoom</code>
     *
     * @throws \Twirp\Error
     */
    public function DeleteRoom(array $ctx, \Livekit\DeleteRoomRequest $req): \Livekit\DeleteRoomResponse;

    /**
     * Lists participants in a room, Requires `roomAdmin`
     *
     * Generated from protobuf method <code>livekit.RoomService/ListParticipants</code>
     *
     * @throws \Twirp\Error
     */
    public function ListParticipants(array $ctx, \Livekit\ListParticipantsRequest $req): \Livekit\ListParticipantsResponse;

    /**
     * Get information on a specific participant, Requires `roomAdmin`
     *
     * Generated from protobuf method <code>livekit.RoomService/GetParticipant</code>
     *
     * @throws \Twirp\Error
     */
    public function GetParticipant(array $ctx, \Livekit\RoomParticipantIdentity $req): \Livekit\ParticipantInfo;

    /**
     * Removes a participant from room. Requires `roomAdmin`
     *
     * Generated from protobuf method <code>livekit.RoomService/RemoveParticipant</code>
     *
     * @throws \Twirp\Error
     */
    public function RemoveParticipant(array $ctx, \Livekit\RoomParticipantIdentity $req): \Livekit\RemoveParticipantResponse;

    /**
     * Mute/unmute a participant's track, Requires `roomAdmin`
     *
     * Generated from protobuf method <code>livekit.RoomService/MutePublishedTrack</code>
     *
     * @throws \Twirp\Error
     */
    public function MutePublishedTrack(array $ctx, \Livekit\MuteRoomTrackRequest $req): \Livekit\MuteRoomTrackResponse;

    /**
     * Update participant metadata, will cause updates to be broadcasted to everyone in the room. Requires `roomAdmin`
     *
     * Generated from protobuf method <code>livekit.RoomService/UpdateParticipant</code>
     *
     * @throws \Twirp\Error
     */
    public function UpdateParticipant(array $ctx, \Livekit\UpdateParticipantRequest $req): \Livekit\ParticipantInfo;

    /**
     * Subscribes or unsubscribe a participant from tracks. Requires `roomAdmin`
     *
     * Generated from protobuf method <code>livekit.RoomService/UpdateSubscriptions</code>
     *
     * @throws \Twirp\Error
     */
    public function UpdateSubscriptions(array $ctx, \Livekit\UpdateSubscriptionsRequest $req): \Livekit\UpdateSubscriptionsResponse;

    /**
     * Send data over data channel to participants in a room, Requires `roomAdmin`
     *
     * Generated from protobuf method <code>livekit.RoomService/SendData</code>
     *
     * @throws \Twirp\Error
     */
    public function SendData(array $ctx, \Livekit\SendDataRequest $req): \Livekit\SendDataResponse;

    /**
     * Update room metadata, will cause updates to be broadcasted to everyone in the room, Requires `roomAdmin`
     *
     * Generated from protobuf method <code>livekit.RoomService/UpdateRoomMetadata</code>
     *
     * @throws \Twirp\Error
     */
    public function UpdateRoomMetadata(array $ctx, \Livekit\UpdateRoomMetadataRequest $req): \Livekit\Room;

    /**
     * Cloud-only
     * a connected participant's track(s) to another room. Requires `roomAdmin` and `destinationRoom`. The forwarding will 
     * stop when the participant leaves the room or `RemoveParticipant` has been called in the destination room. 
     * A participant can be forwarded to multiple rooms. The destination room will be created if it does not exist.
     *
     * Generated from protobuf method <code>livekit.RoomService/ForwardParticipant</code>
     *
     * @throws \Twirp\Error
     */
    public function ForwardParticipant(array $ctx, \Livekit\ForwardParticipantRequest $req): \Livekit\ForwardParticipantResponse;

    /**
     * Cloud-only
     * Move a connected participant to a different room. Requires `roomAdmin` and `destinationRoom`.
     * The participant will be removed from the current room and added to the destination room.
     * From the other observers' perspective, the participant would've disconnected from the previous room and joined the new one.
     *
     * Generated from protobuf method <code>livekit.RoomService/MoveParticipant</code>
     *
     * @throws \Twirp\Error
     */
    public function MoveParticipant(array $ctx, \Livekit\MoveParticipantRequest $req): \Livekit\MoveParticipantResponse;

    /**
     *
     *
     * Generated from protobuf method <code>livekit.RoomService/PerformRpc</code>
     *
     * @throws \Twirp\Error
     */
    public function PerformRpc(array $ctx, \Livekit\PerformRpcRequest $req): \Livekit\PerformRpcResponse;
}
