forked from fibercrypto/libskyfiber
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cgo] refs fibercrypto#116 FInalized
cli.outputs
- Loading branch information
Maykel Arias Torres
committed
Jan 18, 2020
1 parent
d71e80e
commit aa9ccf7
Showing
2 changed files
with
17 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
typedef struct{ | ||
readable__UnspentOutputsSummary Outputs; | ||
} cli__OutputsResult; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,52 @@ | ||
package main | ||
|
||
import ( | ||
cli "github.com/SkycoinProject/skycoin/src/cli" | ||
) | ||
import cli "github.com/SkycoinProject/skycoin/src/cli" | ||
|
||
/* | ||
#include <string.h> | ||
#include <stdlib.h> | ||
#include "skytypes.h" | ||
#include "skyfee.h" | ||
*/ | ||
import "C" | ||
|
||
//export SKY_cli_GetWalletOutputsFromFile | ||
func SKY_cli_GetWalletOutputsFromFile(_c C.GetOutputser__Handle, _walletFile string, _arg2 *C.ReadableUnspentOutputsSummary_Handle) (____error_code uint32) { | ||
c, okc := lookupGetOutputserHandle(_c) | ||
func SKY_cli_GetWalletOutputsFromFile(_c *C.GetOutputser__Handle, _walletFile string, _arg2 *C.UnspentOutputsSummary__Handle) (____error_code uint32) { | ||
__c, okc := lookupGetOutputserHandle(*_c) | ||
if !okc { | ||
____error_code = SKY_BAD_HANDLE | ||
return | ||
} | ||
c := *__c | ||
walletFile := _walletFile | ||
|
||
ru, ____return_err := cli.GetWalletOutputsFromFile(*c, walletFile) | ||
__arg2, ____return_err := cli.GetWalletOutputsFromFile(c, walletFile) | ||
____error_code = libErrorCode(____return_err) | ||
if ____return_err == nil { | ||
|
||
*_arg2 = registerReadableUnspentOutputsSummaryHandle(ru) | ||
|
||
*_arg2 = registerUnspentOutputsSummaryHandle(__arg2) | ||
} | ||
return | ||
} | ||
|
||
//export SKY_cli_GetWalletOutputs | ||
func SKY_cli_GetWalletOutputs(_c C.GetOutputser__Handle, _wlt *C.Wallet__Handle, _arg2 *C.ReadableUnspentOutputsSummary_Handle) (____error_code uint32) { | ||
c, okc := lookupGetOutputserHandle(_c) | ||
func SKY_cli_GetWalletOutputs(_c *C.GetOutputser__Handle, _wlt *C.Wallet__Handle, _arg2 *C.UnspentOutputsSummary__Handle) (____error_code uint32) { | ||
__c, okc := lookupGetOutputserHandle(*_c) | ||
if !okc { | ||
____error_code = SKY_BAD_HANDLE | ||
return | ||
} | ||
wlt, okwlt := lookupWalletHandle(*_wlt) | ||
c := *__c | ||
__wlt, okwlt := lookupWalletHandle(*_wlt) | ||
if !okwlt { | ||
____error_code = SKY_BAD_HANDLE | ||
return | ||
} | ||
__arg2, ____return_err := cli.GetWalletOutputs(*c, *wlt) | ||
wlt := *__wlt | ||
__arg2, ____return_err := cli.GetWalletOutputs(c, wlt) | ||
____error_code = libErrorCode(____return_err) | ||
if ____return_err == nil { | ||
*_arg2 = registerReadableUnspentOutputsSummaryHandle(__arg2) | ||
*_arg2 = registerUnspentOutputsSummaryHandle(__arg2) | ||
} | ||
return | ||
} |