package grpc

import (
	pb "github.com/sorti/openspeak/pkg/api/openspeak/v1"
	"google.golang.org/grpc"
)

// registerAuthHandlers registers auth service handlers
func registerAuthHandlers(grpcServer interface{}, s *Server) {
	authServer := NewAuthServiceServer(s)
	pb.RegisterAuthServiceServer(grpcServer.(*grpc.Server), authServer)
}

// registerChannelHandlers registers channel service handlers
func registerChannelHandlers(grpcServer interface{}, s *Server) {
	channelServer := NewChannelServiceServer(s)
	pb.RegisterChannelServiceServer(grpcServer.(*grpc.Server), channelServer)
}

// registerPresenceHandlers registers presence service handlers
func registerPresenceHandlers(grpcServer interface{}, s *Server) {
	presenceServer := NewPresenceServiceServer(s)
	pb.RegisterPresenceServiceServer(grpcServer.(*grpc.Server), presenceServer)
}

// registerVoiceHandlers registers voice service handlers
func registerVoiceHandlers(grpcServer interface{}, s *Server) {
	voiceServer := NewVoiceServiceServer(s)
	pb.RegisterVoiceServiceServer(grpcServer.(*grpc.Server), voiceServer)
}
