first commit
This commit is contained in:
@ -0,0 +1,83 @@
|
||||
// Code generated by winrt-go-gen. DO NOT EDIT.
|
||||
|
||||
//go:build windows
|
||||
|
||||
//nolint:all
|
||||
package genericattributeprofile
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"github.com/go-ole/go-ole"
|
||||
"github.com/saltosystems/winrt-go/windows/foundation"
|
||||
"github.com/saltosystems/winrt-go/windows/storage/streams"
|
||||
)
|
||||
|
||||
const SignatureGattValueChangedEventArgs string = "rc(Windows.Devices.Bluetooth.GenericAttributeProfile.GattValueChangedEventArgs;{d21bdb54-06e3-4ed8-a263-acfac8ba7313})"
|
||||
|
||||
type GattValueChangedEventArgs struct {
|
||||
ole.IUnknown
|
||||
}
|
||||
|
||||
func (impl *GattValueChangedEventArgs) GetCharacteristicValue() (*streams.IBuffer, error) {
|
||||
itf := impl.MustQueryInterface(ole.NewGUID(GUIDiGattValueChangedEventArgs))
|
||||
defer itf.Release()
|
||||
v := (*iGattValueChangedEventArgs)(unsafe.Pointer(itf))
|
||||
return v.GetCharacteristicValue()
|
||||
}
|
||||
|
||||
func (impl *GattValueChangedEventArgs) GetTimestamp() (foundation.DateTime, error) {
|
||||
itf := impl.MustQueryInterface(ole.NewGUID(GUIDiGattValueChangedEventArgs))
|
||||
defer itf.Release()
|
||||
v := (*iGattValueChangedEventArgs)(unsafe.Pointer(itf))
|
||||
return v.GetTimestamp()
|
||||
}
|
||||
|
||||
const GUIDiGattValueChangedEventArgs string = "d21bdb54-06e3-4ed8-a263-acfac8ba7313"
|
||||
const SignatureiGattValueChangedEventArgs string = "{d21bdb54-06e3-4ed8-a263-acfac8ba7313}"
|
||||
|
||||
type iGattValueChangedEventArgs struct {
|
||||
ole.IInspectable
|
||||
}
|
||||
|
||||
type iGattValueChangedEventArgsVtbl struct {
|
||||
ole.IInspectableVtbl
|
||||
|
||||
GetCharacteristicValue uintptr
|
||||
GetTimestamp uintptr
|
||||
}
|
||||
|
||||
func (v *iGattValueChangedEventArgs) VTable() *iGattValueChangedEventArgsVtbl {
|
||||
return (*iGattValueChangedEventArgsVtbl)(unsafe.Pointer(v.RawVTable))
|
||||
}
|
||||
|
||||
func (v *iGattValueChangedEventArgs) GetCharacteristicValue() (*streams.IBuffer, error) {
|
||||
var out *streams.IBuffer
|
||||
hr, _, _ := syscall.SyscallN(
|
||||
v.VTable().GetCharacteristicValue,
|
||||
uintptr(unsafe.Pointer(v)), // this
|
||||
uintptr(unsafe.Pointer(&out)), // out streams.IBuffer
|
||||
)
|
||||
|
||||
if hr != 0 {
|
||||
return nil, ole.NewError(hr)
|
||||
}
|
||||
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (v *iGattValueChangedEventArgs) GetTimestamp() (foundation.DateTime, error) {
|
||||
var out foundation.DateTime
|
||||
hr, _, _ := syscall.SyscallN(
|
||||
v.VTable().GetTimestamp,
|
||||
uintptr(unsafe.Pointer(v)), // this
|
||||
uintptr(unsafe.Pointer(&out)), // out foundation.DateTime
|
||||
)
|
||||
|
||||
if hr != 0 {
|
||||
return foundation.DateTime{}, ole.NewError(hr)
|
||||
}
|
||||
|
||||
return out, nil
|
||||
}
|
Reference in New Issue
Block a user