-
Notifications
You must be signed in to change notification settings - Fork 2
/
server.go
49 lines (41 loc) · 1.2 KB
/
server.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package iwbemcontext
import (
"context"
"fmt"
"strings"
"unicode/utf16"
dcerpc "github.com/oiweiwei/go-msrpc/dcerpc"
errors "github.com/oiweiwei/go-msrpc/dcerpc/errors"
uuid "github.com/oiweiwei/go-msrpc/midl/uuid"
iunknown "github.com/oiweiwei/go-msrpc/msrpc/dcom/iunknown/v0"
ndr "github.com/oiweiwei/go-msrpc/ndr"
)
var (
_ = context.Background
_ = fmt.Errorf
_ = utf16.Encode
_ = strings.TrimPrefix
_ = ndr.ZeroString
_ = (*uuid.UUID)(nil)
_ = (*dcerpc.SyntaxID)(nil)
_ = (*errors.Error)(nil)
_ = iunknown.GoPackage
)
// IWbemContext server interface.
type ContextServer interface {
// IUnknown base class.
iunknown.UnknownServer
}
func RegisterContextServer(conn dcerpc.Conn, o ContextServer, opts ...dcerpc.Option) {
conn.RegisterServer(NewContextServerHandle(o), append(opts, dcerpc.WithAbstractSyntax(ContextSyntaxV0_0))...)
}
func NewContextServerHandle(o ContextServer) dcerpc.ServerHandle {
return func(ctx context.Context, opNum int, r ndr.Reader) (dcerpc.Operation, error) {
return ContextServerHandle(ctx, o, opNum, r)
}
}
func ContextServerHandle(ctx context.Context, o ContextServer, opNum int, r ndr.Reader) (dcerpc.Operation, error) {
switch opNum {
}
return nil, nil
}