diff --git a/include/fctypes.h b/include/fctypes.h index 6932f6b..e6db401 100644 --- a/include/fctypes.h +++ b/include/fctypes.h @@ -501,9 +501,14 @@ typedef Handle TransactionOutputIteratorMocks__Handle; /** * TxnSignerMocks__Handle Handle, struct - * mocks.TxnSignerIterator + * mocks.TxnSigner */ typedef Handle TxnSignerMocks__Handle; +/** + * TxnSignerIteratorMocks__Handle Handle, struct + * mocks.TxnSignerIterator + */ +typedef Handle TxnSignerIteratorMocks__Handle; // Callbacks diff --git a/lib/cgo/coin.mocks.TxnSignerIterator.go b/lib/cgo/coin.mocks.TxnSignerIterator.go new file mode 100644 index 0000000..e5366aa --- /dev/null +++ b/lib/cgo/coin.mocks.TxnSignerIterator.go @@ -0,0 +1,58 @@ +package main + +/* + + #include + #include + + #include "fctypes.h" +*/ +import "C" + +//export FC_mocks_TxnSignerIterator_Count +func FC_mocks_TxnSignerIterator_Count(__m *C.TxnSignerIteratorMocks__Handle, _arg0 *int) (____error_code uint32) { + _m, ok_m := lookupTxnSignerIteratorMocksHandle(*__m) + if !ok_m { + ____error_code = FC_BAD_HANDLE + return + } + __arg0 := _m.Count() + *_arg0 = __arg0 + return +} + +//export FC_mocks_TxnSignerIterator_HasNext +func FC_mocks_TxnSignerIterator_HasNext(__m *C.TxnSignerIteratorMocks__Handle, _arg0 *bool) (____error_code uint32) { + _m, ok_m := lookupTxnSignerIteratorMocksHandle(*__m) + if !ok_m { + ____error_code = FC_BAD_HANDLE + return + } + __arg0 := _m.HasNext() + *_arg0 = __arg0 + return +} + +//export FC_mocks_TxnSignerIterator_Next +func FC_mocks_TxnSignerIterator_Next(__m *C.TxnSignerIteratorMocks__Handle, _arg0 *bool) (____error_code uint32) { + _m, ok_m := lookupTxnSignerIteratorMocksHandle(*__m) + if !ok_m { + ____error_code = FC_BAD_HANDLE + return + } + __arg0 := _m.Next() + *_arg0 = __arg0 + return +} + +//export FC_mocks_TxnSignerIterator_Value +func FC_mocks_TxnSignerIterator_Value(__m *C.TxnSignerIteratorMocks__Handle, _arg0 *C.TxnSigner__Handle) (____error_code uint32) { + _m, ok_m := lookupTxnSignerIteratorMocksHandle(*__m) + if !ok_m { + ____error_code = FC_BAD_HANDLE + return + } + __arg0 := _m.Value() + *_arg0 = registerTxnSignerHandle(&__arg0) + return +} diff --git a/lib/cgo/handles b/lib/cgo/handles index 283ff9e..3b1a38e 100644 --- a/lib/cgo/handles +++ b/lib/cgo/handles @@ -72,4 +72,5 @@ CGOGEN HANDLES core__TransactionInput|TransactionInput CGOGEN HANDLES mocks__TransactionIterator|TransactionIteratorMocks CGOGEN HANDLES mocks__TransactionOutput|TransactionOutputMocks CGOGEN HANDLES mocks__TransactionOutputIterator|TransactionOutputIteratorMocks -CGOGEN HANDLES mocks__TxnSigner|TxnSignerMocks \ No newline at end of file +CGOGEN HANDLES mocks__TxnSigner|TxnSignerMocks +CGOGEN HANDLES mocks__TxnSignerIterator|TxnSignerIteratorMocks \ No newline at end of file diff --git a/lib/cgo/libfc_handle.go b/lib/cgo/libfc_handle.go index 856e123..9af43bf 100644 --- a/lib/cgo/libfc_handle.go +++ b/lib/cgo/libfc_handle.go @@ -956,3 +956,17 @@ func lookupTxnSignerMocksHandle(handle C.TxnSignerMocks__Handle) (*mocks.TxnSign func registerTxnSignerMocksHandle(obj *mocks.TxnSigner) C.TxnSignerMocks__Handle { return (C.TxnSignerMocks__Handle)(registerHandle(obj)) } + +func lookupTxnSignerIteratorMocksHandle(handle C.TxnSignerIteratorMocks__Handle) (*mocks.TxnSignerIterator, bool) { + obj, ok := lookupHandle(C.Handle(handle)) + if ok { + if obj, isOK := (obj).(*mocks.TxnSignerIterator); isOK { + return obj, true + } + } + return nil, false +} + +func registerTxnSignerIteratorMocksHandle(obj *mocks.TxnSignerIterator) C.TxnSignerIteratorMocks__Handle { + return (C.TxnSignerIteratorMocks__Handle)(registerHandle(obj)) +}