bldr/desktop/tray/tray_srpc.pb.go
Rama master · réplica de lectura del repositorio original.
// Code generated by protoc-gen-srpc. DO NOT EDIT.
// protoc-gen-srpc version: v0.52.4-0.20261024233818-0a9074172c29
// source: github.com/s4wave/spacewave/bldr/desktop/tray/tray.proto
package desktop_tray
import (
context "context"
srpc "github.com/aperturerobotics/starpc/srpc"
)
type SRPCDesktopTrayResourceServiceClient interface {
// SRPCClient returns the underlying SRPC client.
SRPCClient() srpc.Client
// RegisterDesktopTrayEntry registers one resource-backed tray entry.
RegisterDesktopTrayEntry(ctx context.Context, in *RegisterDesktopTrayEntryRequest) (*RegisterDesktopTrayEntryResponse, error)
// WatchDesktopTray streams the full ordered tray tree.
WatchDesktopTray(ctx context.Context, in *WatchDesktopTrayRequest) (SRPCDesktopTrayResourceService_WatchDesktopTrayClient, error)
// InvokeDesktopTrayEntry invokes an action entry by id.
InvokeDesktopTrayEntry(ctx context.Context, in *InvokeDesktopTrayEntryRequest) (*InvokeDesktopTrayEntryResponse, error)
}
type srpcDesktopTrayResourceServiceClient struct {
cc srpc.Client
serviceID string
}
func NewSRPCDesktopTrayResourceServiceClient(cc srpc.Client) SRPCDesktopTrayResourceServiceClient {
return &srpcDesktopTrayResourceServiceClient{cc: cc, serviceID: SRPCDesktopTrayResourceServiceServiceID}
}
func NewSRPCDesktopTrayResourceServiceClientWithServiceID(cc srpc.Client, serviceID string) SRPCDesktopTrayResourceServiceClient {
if serviceID == "" {
serviceID = SRPCDesktopTrayResourceServiceServiceID
}
return &srpcDesktopTrayResourceServiceClient{cc: cc, serviceID: serviceID}
}
func (c *srpcDesktopTrayResourceServiceClient) SRPCClient() srpc.Client { return c.cc }
func (c *srpcDesktopTrayResourceServiceClient) RegisterDesktopTrayEntry(ctx context.Context, in *RegisterDesktopTrayEntryRequest) (*RegisterDesktopTrayEntryResponse, error) {
out := new(RegisterDesktopTrayEntryResponse)
err := c.cc.ExecCall(ctx, c.serviceID, "RegisterDesktopTrayEntry", in, out)
if err != nil {
return nil, err
}
return out, nil
}
func (c *srpcDesktopTrayResourceServiceClient) WatchDesktopTray(ctx context.Context, in *WatchDesktopTrayRequest) (SRPCDesktopTrayResourceService_WatchDesktopTrayClient, error) {
stream, err := c.cc.NewStream(ctx, c.serviceID, "WatchDesktopTray", in)
if err != nil {
return nil, err
}
strm := &srpcDesktopTrayResourceService_WatchDesktopTrayClient{stream}
// A failed half-close means the call ended; MsgRecv reports its outcome.
_ = strm.CloseSend()
return strm, nil
}
type SRPCDesktopTrayResourceService_WatchDesktopTrayClient interface {
srpc.Stream
Recv() (*WatchDesktopTrayResponse, error)
RecvTo(*WatchDesktopTrayResponse) error
}
type srpcDesktopTrayResourceService_WatchDesktopTrayClient struct {
srpc.Stream
}
func (x *srpcDesktopTrayResourceService_WatchDesktopTrayClient) Recv() (*WatchDesktopTrayResponse, error) {
m := new(WatchDesktopTrayResponse)
if err := x.MsgRecv(m); err != nil {
return nil, err
}
return m, nil
}
func (x *srpcDesktopTrayResourceService_WatchDesktopTrayClient) RecvTo(m *WatchDesktopTrayResponse) error {
return x.MsgRecv(m)
}
func (c *srpcDesktopTrayResourceServiceClient) InvokeDesktopTrayEntry(ctx context.Context, in *InvokeDesktopTrayEntryRequest) (*InvokeDesktopTrayEntryResponse, error) {
out := new(InvokeDesktopTrayEntryResponse)
err := c.cc.ExecCall(ctx, c.serviceID, "InvokeDesktopTrayEntry", in, out)
if err != nil {
return nil, err
}
return out, nil
}
type SRPCDesktopTrayResourceServiceServer interface {
// RegisterDesktopTrayEntry registers one resource-backed tray entry.
RegisterDesktopTrayEntry(context.Context, *RegisterDesktopTrayEntryRequest) (*RegisterDesktopTrayEntryResponse, error)
// WatchDesktopTray streams the full ordered tray tree.
WatchDesktopTray(*WatchDesktopTrayRequest, SRPCDesktopTrayResourceService_WatchDesktopTrayStream) error
// InvokeDesktopTrayEntry invokes an action entry by id.
InvokeDesktopTrayEntry(context.Context, *InvokeDesktopTrayEntryRequest) (*InvokeDesktopTrayEntryResponse, error)
}
const SRPCDesktopTrayResourceServiceServiceID = "bldr.desktop.tray.DesktopTrayResourceService"
type SRPCDesktopTrayResourceServiceHandler struct {
serviceID string
impl SRPCDesktopTrayResourceServiceServer
}
// NewSRPCDesktopTrayResourceServiceHandler constructs a new RPC handler.
// serviceID: if empty, uses default: bldr.desktop.tray.DesktopTrayResourceService
func NewSRPCDesktopTrayResourceServiceHandler(impl SRPCDesktopTrayResourceServiceServer, serviceID string) srpc.Handler {
if serviceID == "" {
serviceID = SRPCDesktopTrayResourceServiceServiceID
}
return &SRPCDesktopTrayResourceServiceHandler{impl: impl, serviceID: serviceID}
}
// SRPCRegisterDesktopTrayResourceService registers the implementation with the mux.
// Uses the default serviceID: bldr.desktop.tray.DesktopTrayResourceService
func SRPCRegisterDesktopTrayResourceService(mux srpc.Mux, impl SRPCDesktopTrayResourceServiceServer) error {
return mux.Register(NewSRPCDesktopTrayResourceServiceHandler(impl, ""))
}
func (d *SRPCDesktopTrayResourceServiceHandler) GetServiceID() string { return d.serviceID }
func (SRPCDesktopTrayResourceServiceHandler) GetMethodIDs() []string {
return []string{
"RegisterDesktopTrayEntry",
"WatchDesktopTray",
"InvokeDesktopTrayEntry",
}
}
func (d *SRPCDesktopTrayResourceServiceHandler) InvokeMethod(
serviceID, methodID string,
strm srpc.Stream,
) (bool, error) {
if serviceID != "" && serviceID != d.GetServiceID() {
return false, nil
}
switch methodID {
case "RegisterDesktopTrayEntry":
return true, d.InvokeMethod_RegisterDesktopTrayEntry(d.impl, strm)
case "WatchDesktopTray":
return true, d.InvokeMethod_WatchDesktopTray(d.impl, strm)
case "InvokeDesktopTrayEntry":
return true, d.InvokeMethod_InvokeDesktopTrayEntry(d.impl, strm)
default:
return false, nil
}
}
func (SRPCDesktopTrayResourceServiceHandler) InvokeMethod_RegisterDesktopTrayEntry(impl SRPCDesktopTrayResourceServiceServer, strm srpc.Stream) error {
req := new(RegisterDesktopTrayEntryRequest)
if err := strm.MsgRecv(req); err != nil {
return err
}
out, err := impl.RegisterDesktopTrayEntry(strm.Context(), req)
if err != nil {
return err
}
return strm.MsgSend(out)
}
func (SRPCDesktopTrayResourceServiceHandler) InvokeMethod_WatchDesktopTray(impl SRPCDesktopTrayResourceServiceServer, strm srpc.Stream) error {
req := new(WatchDesktopTrayRequest)
if err := strm.MsgRecv(req); err != nil {
return err
}
serverStrm := &srpcDesktopTrayResourceService_WatchDesktopTrayStream{strm}
return impl.WatchDesktopTray(req, serverStrm)
}
func (SRPCDesktopTrayResourceServiceHandler) InvokeMethod_InvokeDesktopTrayEntry(impl SRPCDesktopTrayResourceServiceServer, strm srpc.Stream) error {
req := new(InvokeDesktopTrayEntryRequest)
if err := strm.MsgRecv(req); err != nil {
return err
}
out, err := impl.InvokeDesktopTrayEntry(strm.Context(), req)
if err != nil {
return err
}
return strm.MsgSend(out)
}
type SRPCDesktopTrayResourceService_RegisterDesktopTrayEntryStream interface {
srpc.Stream
}
type srpcDesktopTrayResourceService_RegisterDesktopTrayEntryStream struct {
srpc.Stream
}
type SRPCDesktopTrayResourceService_WatchDesktopTrayStream interface {
srpc.Stream
Send(*WatchDesktopTrayResponse) error
SendAndClose(*WatchDesktopTrayResponse) error
}
type srpcDesktopTrayResourceService_WatchDesktopTrayStream struct {
srpc.Stream
}
func (x *srpcDesktopTrayResourceService_WatchDesktopTrayStream) Send(m *WatchDesktopTrayResponse) error {
return x.MsgSend(m)
}
func (x *srpcDesktopTrayResourceService_WatchDesktopTrayStream) SendAndClose(m *WatchDesktopTrayResponse) error {
if m != nil {
if err := x.MsgSend(m); err != nil {
return err
}
}
return x.CloseSend()
}
type SRPCDesktopTrayResourceService_InvokeDesktopTrayEntryStream interface {
srpc.Stream
}
type srpcDesktopTrayResourceService_InvokeDesktopTrayEntryStream struct {
srpc.Stream
}
type SRPCDesktopTrayEntryResourceServiceClient interface {
// SRPCClient returns the underlying SRPC client.
SRPCClient() srpc.Client
// SetDesktopTrayEntry replaces the registered entry.
SetDesktopTrayEntry(ctx context.Context, in *SetDesktopTrayEntryRequest) (*SetDesktopTrayEntryResponse, error)
// SetDesktopTrayEntryActive updates the entry active flag.
SetDesktopTrayEntryActive(ctx context.Context, in *SetDesktopTrayEntryActiveRequest) (*SetDesktopTrayEntryActiveResponse, error)
// SetDesktopTrayEntryEnabled updates the entry enabled flag.
SetDesktopTrayEntryEnabled(ctx context.Context, in *SetDesktopTrayEntryEnabledRequest) (*SetDesktopTrayEntryEnabledResponse, error)
}
type srpcDesktopTrayEntryResourceServiceClient struct {
cc srpc.Client
serviceID string
}
func NewSRPCDesktopTrayEntryResourceServiceClient(cc srpc.Client) SRPCDesktopTrayEntryResourceServiceClient {
return &srpcDesktopTrayEntryResourceServiceClient{cc: cc, serviceID: SRPCDesktopTrayEntryResourceServiceServiceID}
}
func NewSRPCDesktopTrayEntryResourceServiceClientWithServiceID(cc srpc.Client, serviceID string) SRPCDesktopTrayEntryResourceServiceClient {
if serviceID == "" {
serviceID = SRPCDesktopTrayEntryResourceServiceServiceID
}
return &srpcDesktopTrayEntryResourceServiceClient{cc: cc, serviceID: serviceID}
}
func (c *srpcDesktopTrayEntryResourceServiceClient) SRPCClient() srpc.Client { return c.cc }
func (c *srpcDesktopTrayEntryResourceServiceClient) SetDesktopTrayEntry(ctx context.Context, in *SetDesktopTrayEntryRequest) (*SetDesktopTrayEntryResponse, error) {
out := new(SetDesktopTrayEntryResponse)
err := c.cc.ExecCall(ctx, c.serviceID, "SetDesktopTrayEntry", in, out)
if err != nil {
return nil, err
}
return out, nil
}
func (c *srpcDesktopTrayEntryResourceServiceClient) SetDesktopTrayEntryActive(ctx context.Context, in *SetDesktopTrayEntryActiveRequest) (*SetDesktopTrayEntryActiveResponse, error) {
out := new(SetDesktopTrayEntryActiveResponse)
err := c.cc.ExecCall(ctx, c.serviceID, "SetDesktopTrayEntryActive", in, out)
if err != nil {
return nil, err
}
return out, nil
}
func (c *srpcDesktopTrayEntryResourceServiceClient) SetDesktopTrayEntryEnabled(ctx context.Context, in *SetDesktopTrayEntryEnabledRequest) (*SetDesktopTrayEntryEnabledResponse, error) {
out := new(SetDesktopTrayEntryEnabledResponse)
err := c.cc.ExecCall(ctx, c.serviceID, "SetDesktopTrayEntryEnabled", in, out)
if err != nil {
return nil, err
}
return out, nil
}
type SRPCDesktopTrayEntryResourceServiceServer interface {
// SetDesktopTrayEntry replaces the registered entry.
SetDesktopTrayEntry(context.Context, *SetDesktopTrayEntryRequest) (*SetDesktopTrayEntryResponse, error)
// SetDesktopTrayEntryActive updates the entry active flag.
SetDesktopTrayEntryActive(context.Context, *SetDesktopTrayEntryActiveRequest) (*SetDesktopTrayEntryActiveResponse, error)
// SetDesktopTrayEntryEnabled updates the entry enabled flag.
SetDesktopTrayEntryEnabled(context.Context, *SetDesktopTrayEntryEnabledRequest) (*SetDesktopTrayEntryEnabledResponse, error)
}
const SRPCDesktopTrayEntryResourceServiceServiceID = "bldr.desktop.tray.DesktopTrayEntryResourceService"
type SRPCDesktopTrayEntryResourceServiceHandler struct {
serviceID string
impl SRPCDesktopTrayEntryResourceServiceServer
}
// NewSRPCDesktopTrayEntryResourceServiceHandler constructs a new RPC handler.
// serviceID: if empty, uses default: bldr.desktop.tray.DesktopTrayEntryResourceService
func NewSRPCDesktopTrayEntryResourceServiceHandler(impl SRPCDesktopTrayEntryResourceServiceServer, serviceID string) srpc.Handler {
if serviceID == "" {
serviceID = SRPCDesktopTrayEntryResourceServiceServiceID
}
return &SRPCDesktopTrayEntryResourceServiceHandler{impl: impl, serviceID: serviceID}
}
// SRPCRegisterDesktopTrayEntryResourceService registers the implementation with the mux.
// Uses the default serviceID: bldr.desktop.tray.DesktopTrayEntryResourceService
func SRPCRegisterDesktopTrayEntryResourceService(mux srpc.Mux, impl SRPCDesktopTrayEntryResourceServiceServer) error {
return mux.Register(NewSRPCDesktopTrayEntryResourceServiceHandler(impl, ""))
}
func (d *SRPCDesktopTrayEntryResourceServiceHandler) GetServiceID() string { return d.serviceID }
func (SRPCDesktopTrayEntryResourceServiceHandler) GetMethodIDs() []string {
return []string{
"SetDesktopTrayEntry",
"SetDesktopTrayEntryActive",
"SetDesktopTrayEntryEnabled",
}
}
func (d *SRPCDesktopTrayEntryResourceServiceHandler) InvokeMethod(
serviceID, methodID string,
strm srpc.Stream,
) (bool, error) {
if serviceID != "" && serviceID != d.GetServiceID() {
return false, nil
}
switch methodID {
case "SetDesktopTrayEntry":
return true, d.InvokeMethod_SetDesktopTrayEntry(d.impl, strm)
case "SetDesktopTrayEntryActive":
return true, d.InvokeMethod_SetDesktopTrayEntryActive(d.impl, strm)
case "SetDesktopTrayEntryEnabled":
return true, d.InvokeMethod_SetDesktopTrayEntryEnabled(d.impl, strm)
default:
return false, nil
}
}
func (SRPCDesktopTrayEntryResourceServiceHandler) InvokeMethod_SetDesktopTrayEntry(impl SRPCDesktopTrayEntryResourceServiceServer, strm srpc.Stream) error {
req := new(SetDesktopTrayEntryRequest)
if err := strm.MsgRecv(req); err != nil {
return err
}
out, err := impl.SetDesktopTrayEntry(strm.Context(), req)
if err != nil {
return err
}
return strm.MsgSend(out)
}
func (SRPCDesktopTrayEntryResourceServiceHandler) InvokeMethod_SetDesktopTrayEntryActive(impl SRPCDesktopTrayEntryResourceServiceServer, strm srpc.Stream) error {
req := new(SetDesktopTrayEntryActiveRequest)
if err := strm.MsgRecv(req); err != nil {
return err
}
out, err := impl.SetDesktopTrayEntryActive(strm.Context(), req)
if err != nil {
return err
}
return strm.MsgSend(out)
}
func (SRPCDesktopTrayEntryResourceServiceHandler) InvokeMethod_SetDesktopTrayEntryEnabled(impl SRPCDesktopTrayEntryResourceServiceServer, strm srpc.Stream) error {
req := new(SetDesktopTrayEntryEnabledRequest)
if err := strm.MsgRecv(req); err != nil {
return err
}
out, err := impl.SetDesktopTrayEntryEnabled(strm.Context(), req)
if err != nil {
return err
}
return strm.MsgSend(out)
}
type SRPCDesktopTrayEntryResourceService_SetDesktopTrayEntryStream interface {
srpc.Stream
}
type srpcDesktopTrayEntryResourceService_SetDesktopTrayEntryStream struct {
srpc.Stream
}
type SRPCDesktopTrayEntryResourceService_SetDesktopTrayEntryActiveStream interface {
srpc.Stream
}
type srpcDesktopTrayEntryResourceService_SetDesktopTrayEntryActiveStream struct {
srpc.Stream
}
type SRPCDesktopTrayEntryResourceService_SetDesktopTrayEntryEnabledStream interface {
srpc.Stream
}
type srpcDesktopTrayEntryResourceService_SetDesktopTrayEntryEnabledStream struct {
srpc.Stream
}
type SRPCDesktopTrayActionHandlerServiceClient interface {
// SRPCClient returns the underlying SRPC client.
SRPCClient() srpc.Client
// HandleDesktopTrayAction handles a native tray action invocation.
HandleDesktopTrayAction(ctx context.Context, in *HandleDesktopTrayActionRequest) (*HandleDesktopTrayActionResponse, error)
}
type srpcDesktopTrayActionHandlerServiceClient struct {
cc srpc.Client
serviceID string
}
func NewSRPCDesktopTrayActionHandlerServiceClient(cc srpc.Client) SRPCDesktopTrayActionHandlerServiceClient {
return &srpcDesktopTrayActionHandlerServiceClient{cc: cc, serviceID: SRPCDesktopTrayActionHandlerServiceServiceID}
}
func NewSRPCDesktopTrayActionHandlerServiceClientWithServiceID(cc srpc.Client, serviceID string) SRPCDesktopTrayActionHandlerServiceClient {
if serviceID == "" {
serviceID = SRPCDesktopTrayActionHandlerServiceServiceID
}
return &srpcDesktopTrayActionHandlerServiceClient{cc: cc, serviceID: serviceID}
}
func (c *srpcDesktopTrayActionHandlerServiceClient) SRPCClient() srpc.Client { return c.cc }
func (c *srpcDesktopTrayActionHandlerServiceClient) HandleDesktopTrayAction(ctx context.Context, in *HandleDesktopTrayActionRequest) (*HandleDesktopTrayActionResponse, error) {
out := new(HandleDesktopTrayActionResponse)
err := c.cc.ExecCall(ctx, c.serviceID, "HandleDesktopTrayAction", in, out)
if err != nil {
return nil, err
}
return out, nil
}
type SRPCDesktopTrayActionHandlerServiceServer interface {
// HandleDesktopTrayAction handles a native tray action invocation.
HandleDesktopTrayAction(context.Context, *HandleDesktopTrayActionRequest) (*HandleDesktopTrayActionResponse, error)
}
const SRPCDesktopTrayActionHandlerServiceServiceID = "bldr.desktop.tray.DesktopTrayActionHandlerService"
type SRPCDesktopTrayActionHandlerServiceHandler struct {
serviceID string
impl SRPCDesktopTrayActionHandlerServiceServer
}
// NewSRPCDesktopTrayActionHandlerServiceHandler constructs a new RPC handler.
// serviceID: if empty, uses default: bldr.desktop.tray.DesktopTrayActionHandlerService
func NewSRPCDesktopTrayActionHandlerServiceHandler(impl SRPCDesktopTrayActionHandlerServiceServer, serviceID string) srpc.Handler {
if serviceID == "" {
serviceID = SRPCDesktopTrayActionHandlerServiceServiceID
}
return &SRPCDesktopTrayActionHandlerServiceHandler{impl: impl, serviceID: serviceID}
}
// SRPCRegisterDesktopTrayActionHandlerService registers the implementation with the mux.
// Uses the default serviceID: bldr.desktop.tray.DesktopTrayActionHandlerService
func SRPCRegisterDesktopTrayActionHandlerService(mux srpc.Mux, impl SRPCDesktopTrayActionHandlerServiceServer) error {
return mux.Register(NewSRPCDesktopTrayActionHandlerServiceHandler(impl, ""))
}
func (d *SRPCDesktopTrayActionHandlerServiceHandler) GetServiceID() string { return d.serviceID }
func (SRPCDesktopTrayActionHandlerServiceHandler) GetMethodIDs() []string {
return []string{
"HandleDesktopTrayAction",
}
}
func (d *SRPCDesktopTrayActionHandlerServiceHandler) InvokeMethod(
serviceID, methodID string,
strm srpc.Stream,
) (bool, error) {
if serviceID != "" && serviceID != d.GetServiceID() {
return false, nil
}
switch methodID {
case "HandleDesktopTrayAction":
return true, d.InvokeMethod_HandleDesktopTrayAction(d.impl, strm)
default:
return false, nil
}
}
func (SRPCDesktopTrayActionHandlerServiceHandler) InvokeMethod_HandleDesktopTrayAction(impl SRPCDesktopTrayActionHandlerServiceServer, strm srpc.Stream) error {
req := new(HandleDesktopTrayActionRequest)
if err := strm.MsgRecv(req); err != nil {
return err
}
out, err := impl.HandleDesktopTrayAction(strm.Context(), req)
if err != nil {
return err
}
return strm.MsgSend(out)
}
type SRPCDesktopTrayActionHandlerService_HandleDesktopTrayActionStream interface {
srpc.Stream
}
type srpcDesktopTrayActionHandlerService_HandleDesktopTrayActionStream struct {
srpc.Stream
}