// Code generated by goctl. DO NOT EDIT.
// Source: conversation.proto

package server

import (
	"context"

	"github.com/cherish-chat/xxim-server/app/conversation/internal/logic/subscriptionservice"
	"github.com/cherish-chat/xxim-server/app/conversation/internal/svc"
	"github.com/cherish-chat/xxim-server/common/pb"
)

type SubscriptionServiceServer struct {
	svcCtx *svc.ServiceContext
	pb.UnimplementedSubscriptionServiceServer
}

func NewSubscriptionServiceServer(svcCtx *svc.ServiceContext) *SubscriptionServiceServer {
	return &SubscriptionServiceServer{
		svcCtx: svcCtx,
	}
}

// SubscriptionSubscribe 订阅号订阅
func (s *SubscriptionServiceServer) SubscriptionSubscribe(ctx context.Context, in *pb.SubscriptionSubscribeReq) (*pb.SubscriptionSubscribeResp, error) {
	l := subscriptionservicelogic.NewSubscriptionSubscribeLogic(ctx, s.svcCtx)
	return l.SubscriptionSubscribe(in)
}

// SubscriptionAfterOnline 订阅号在做用户上线后的操作
func (s *SubscriptionServiceServer) SubscriptionAfterOnline(ctx context.Context, in *pb.SubscriptionAfterOnlineReq) (*pb.SubscriptionAfterOnlineResp, error) {
	l := subscriptionservicelogic.NewSubscriptionAfterOnlineLogic(ctx, s.svcCtx)
	return l.SubscriptionAfterOnline(in)
}

// SubscriptionAfterOffline 订阅号在做用户下线后的操作
func (s *SubscriptionServiceServer) SubscriptionAfterOffline(ctx context.Context, in *pb.SubscriptionAfterOfflineReq) (*pb.SubscriptionAfterOfflineResp, error) {
	l := subscriptionservicelogic.NewSubscriptionAfterOfflineLogic(ctx, s.svcCtx)
	return l.SubscriptionAfterOffline(in)
}

// UpsertUserSubscription 更新用户订阅的订阅号
func (s *SubscriptionServiceServer) UpsertUserSubscription(ctx context.Context, in *pb.UpsertUserSubscriptionReq) (*pb.UpsertUserSubscriptionResp, error) {
	l := subscriptionservicelogic.NewUpsertUserSubscriptionLogic(ctx, s.svcCtx)
	return l.UpsertUserSubscription(in)
}

// DeleteUserSubscription 删除用户订阅的订阅号
func (s *SubscriptionServiceServer) DeleteUserSubscription(ctx context.Context, in *pb.DeleteUserSubscriptionReq) (*pb.DeleteUserSubscriptionResp, error) {
	l := subscriptionservicelogic.NewDeleteUserSubscriptionLogic(ctx, s.svcCtx)
	return l.DeleteUserSubscription(in)
}

// ListSubscriptionSubscribers 列出订阅号订阅者
func (s *SubscriptionServiceServer) ListSubscriptionSubscribers(ctx context.Context, in *pb.ListSubscriptionSubscribersReq) (*pb.ListSubscriptionSubscribersResp, error) {
	l := subscriptionservicelogic.NewListSubscriptionSubscribersLogic(ctx, s.svcCtx)
	return l.ListSubscriptionSubscribers(in)
}
