# -*- coding: UTF-8 -*-
# Code generated by lark suite oapi sdk gen

from typing import Callable

from ....config import Config
from ....context import Context
from ....event.event import set_event_callback

from .model import *


class MeetingLeaveMeetingEventHandler(object):
    def __init__(self, callback):
        # type: (Callable[[Context, Config, MeetingLeaveMeetingEvent], Any]) -> None
        self.handler = callback

    def handle(self, ctx, conf, event):  # type: (Context, Config, MeetingLeaveMeetingEvent) -> Any
        return self.handler(ctx, conf, event)

    @staticmethod
    def set_callback(conf, callback):
        # type: (Config, Callable[[Context, Config, MeetingLeaveMeetingEvent], Any]) -> None
        handler = MeetingLeaveMeetingEventHandler(callback)
        set_event_callback(conf, "vc.meeting.leave_meeting_v1",
                          handler.handle, clazz=MeetingLeaveMeetingEvent)


class MeetingMeetingEndedEventHandler(object):
    def __init__(self, callback):
        # type: (Callable[[Context, Config, MeetingMeetingEndedEvent], Any]) -> None
        self.handler = callback

    def handle(self, ctx, conf, event):  # type: (Context, Config, MeetingMeetingEndedEvent) -> Any
        return self.handler(ctx, conf, event)

    @staticmethod
    def set_callback(conf, callback):
        # type: (Config, Callable[[Context, Config, MeetingMeetingEndedEvent], Any]) -> None
        handler = MeetingMeetingEndedEventHandler(callback)
        set_event_callback(conf, "vc.meeting.meeting_ended_v1",
                          handler.handle, clazz=MeetingMeetingEndedEvent)


class MeetingMeetingStartedEventHandler(object):
    def __init__(self, callback):
        # type: (Callable[[Context, Config, MeetingMeetingStartedEvent], Any]) -> None
        self.handler = callback

    def handle(self, ctx, conf, event):  # type: (Context, Config, MeetingMeetingStartedEvent) -> Any
        return self.handler(ctx, conf, event)

    @staticmethod
    def set_callback(conf, callback):
        # type: (Config, Callable[[Context, Config, MeetingMeetingStartedEvent], Any]) -> None
        handler = MeetingMeetingStartedEventHandler(callback)
        set_event_callback(conf, "vc.meeting.meeting_started_v1",
                          handler.handle, clazz=MeetingMeetingStartedEvent)


class MeetingRecordingEndedEventHandler(object):
    def __init__(self, callback):
        # type: (Callable[[Context, Config, MeetingRecordingEndedEvent], Any]) -> None
        self.handler = callback

    def handle(self, ctx, conf, event):  # type: (Context, Config, MeetingRecordingEndedEvent) -> Any
        return self.handler(ctx, conf, event)

    @staticmethod
    def set_callback(conf, callback):
        # type: (Config, Callable[[Context, Config, MeetingRecordingEndedEvent], Any]) -> None
        handler = MeetingRecordingEndedEventHandler(callback)
        set_event_callback(conf, "vc.meeting.recording_ended_v1",
                          handler.handle, clazz=MeetingRecordingEndedEvent)


class MeetingShareEndedEventHandler(object):
    def __init__(self, callback):
        # type: (Callable[[Context, Config, MeetingShareEndedEvent], Any]) -> None
        self.handler = callback

    def handle(self, ctx, conf, event):  # type: (Context, Config, MeetingShareEndedEvent) -> Any
        return self.handler(ctx, conf, event)

    @staticmethod
    def set_callback(conf, callback):
        # type: (Config, Callable[[Context, Config, MeetingShareEndedEvent], Any]) -> None
        handler = MeetingShareEndedEventHandler(callback)
        set_event_callback(conf, "vc.meeting.share_ended_v1",
                          handler.handle, clazz=MeetingShareEndedEvent)


class MeetingJoinMeetingEventHandler(object):
    def __init__(self, callback):
        # type: (Callable[[Context, Config, MeetingJoinMeetingEvent], Any]) -> None
        self.handler = callback

    def handle(self, ctx, conf, event):  # type: (Context, Config, MeetingJoinMeetingEvent) -> Any
        return self.handler(ctx, conf, event)

    @staticmethod
    def set_callback(conf, callback):
        # type: (Config, Callable[[Context, Config, MeetingJoinMeetingEvent], Any]) -> None
        handler = MeetingJoinMeetingEventHandler(callback)
        set_event_callback(conf, "vc.meeting.join_meeting_v1",
                          handler.handle, clazz=MeetingJoinMeetingEvent)


class MeetingRecordingStartedEventHandler(object):
    def __init__(self, callback):
        # type: (Callable[[Context, Config, MeetingRecordingStartedEvent], Any]) -> None
        self.handler = callback

    def handle(self, ctx, conf, event):  # type: (Context, Config, MeetingRecordingStartedEvent) -> Any
        return self.handler(ctx, conf, event)

    @staticmethod
    def set_callback(conf, callback):
        # type: (Config, Callable[[Context, Config, MeetingRecordingStartedEvent], Any]) -> None
        handler = MeetingRecordingStartedEventHandler(callback)
        set_event_callback(conf, "vc.meeting.recording_started_v1",
                          handler.handle, clazz=MeetingRecordingStartedEvent)


class MeetingSendMeetingImEventHandler(object):
    def __init__(self, callback):
        # type: (Callable[[Context, Config, MeetingSendMeetingImEvent], Any]) -> None
        self.handler = callback

    def handle(self, ctx, conf, event):  # type: (Context, Config, MeetingSendMeetingImEvent) -> Any
        return self.handler(ctx, conf, event)

    @staticmethod
    def set_callback(conf, callback):
        # type: (Config, Callable[[Context, Config, MeetingSendMeetingImEvent], Any]) -> None
        handler = MeetingSendMeetingImEventHandler(callback)
        set_event_callback(conf, "vc.meeting.send_meeting_im_v1",
                          handler.handle, clazz=MeetingSendMeetingImEvent)


class MeetingShareStartedEventHandler(object):
    def __init__(self, callback):
        # type: (Callable[[Context, Config, MeetingShareStartedEvent], Any]) -> None
        self.handler = callback

    def handle(self, ctx, conf, event):  # type: (Context, Config, MeetingShareStartedEvent) -> Any
        return self.handler(ctx, conf, event)

    @staticmethod
    def set_callback(conf, callback):
        # type: (Config, Callable[[Context, Config, MeetingShareStartedEvent], Any]) -> None
        handler = MeetingShareStartedEventHandler(callback)
        set_event_callback(conf, "vc.meeting.share_started_v1",
                          handler.handle, clazz=MeetingShareStartedEvent)


class MeetingRecordingReadyEventHandler(object):
    def __init__(self, callback):
        # type: (Callable[[Context, Config, MeetingRecordingReadyEvent], Any]) -> None
        self.handler = callback

    def handle(self, ctx, conf, event):  # type: (Context, Config, MeetingRecordingReadyEvent) -> Any
        return self.handler(ctx, conf, event)

    @staticmethod
    def set_callback(conf, callback):
        # type: (Config, Callable[[Context, Config, MeetingRecordingReadyEvent], Any]) -> None
        handler = MeetingRecordingReadyEventHandler(callback)
        set_event_callback(conf, "vc.meeting.recording_ready_v1",
                          handler.handle, clazz=MeetingRecordingReadyEvent)
