Skip to content

Commit

Permalink
Added function for retrieving balance
Browse files Browse the repository at this point in the history
  • Loading branch information
EduMenges committed Sep 5, 2024
1 parent 3907674 commit b20a739
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
5 changes: 5 additions & 0 deletions src/GeniusSDK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,8 @@ void GeniusSDKProcess( const ImagePath_t path, const PayAmount_t amount )
{
GeniusNodeInstance->ProcessImage( std::string{ path }, amount );
}

uint64_t GeniusSDKGetBalance()
{
return GeniusNodeInstance->GetBalance();
}
21 changes: 12 additions & 9 deletions src/GeniusSDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
#ifndef _GENIUSSDK_H
#define _GENIUSSDK_H

#include <memory>
#include <stdint.h>

#ifndef GNUS_EXPORT_BEGIN
#if defined(__cplusplus)
#define GNUS_EXPORT_BEGIN extern "C" {
#define GNUS_EXPORT_END }
#endif
#if defined( __cplusplus )
#define GNUS_EXPORT_BEGIN \
extern "C" \
{
#define GNUS_EXPORT_END }
#endif
#endif

#ifdef _WIN32
Expand All @@ -24,11 +26,12 @@

GNUS_EXPORT_BEGIN

typedef char ImagePath_t[1024]; ///< ID/Path of the image to be processed
typedef uint64_t PayAmount_t; ///< Amount to be paid for the processing
typedef char ImagePath_t[1024]; ///< ID/Path of the image to be processed
typedef uint64_t PayAmount_t; ///< Amount to be paid for the processing

GNUS_VISIBILITY_DEFAULT const char *GeniusSDKInit( const char *base_path );
GNUS_VISIBILITY_DEFAULT void GeniusSDKProcess( const ImagePath_t path, const PayAmount_t amount );
GNUS_VISIBILITY_DEFAULT const char *GeniusSDKInit( const char *base_path );
GNUS_VISIBILITY_DEFAULT void GeniusSDKProcess( const ImagePath_t path, PayAmount_t amount );
GNUS_VISIBILITY_DEFAULT uint64_t GeniusSDKGetBalance();

GNUS_EXPORT_END

Expand Down

0 comments on commit b20a739

Please sign in to comment.