summaryrefslogtreecommitdiff
path: root/binaryninjaapi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'binaryninjaapi.cpp')
-rw-r--r--binaryninjaapi.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/binaryninjaapi.cpp b/binaryninjaapi.cpp
index 54ee97ad..f526320a 100644
--- a/binaryninjaapi.cpp
+++ b/binaryninjaapi.cpp
@@ -203,6 +203,36 @@ string BinaryNinja::GetVersionString()
}
+VersionInfo BinaryNinja::GetVersionInfo()
+{
+ BNVersionInfo result = BNGetVersionInfo();
+ VersionInfo info;
+ info.major = result.major;
+ info.minor = result.minor;
+ info.build = result.build;
+ info.channel = "";
+ if (result.channel)
+ info.channel = result.channel;
+ BNFreeString(result.channel);
+ return info;
+}
+
+
+VersionInfo ParseVersionString(const string &version)
+{
+ BNVersionInfo result = BNParseVersionString(version.c_str());
+ VersionInfo info;
+ info.major = result.major;
+ info.minor = result.minor;
+ info.build = result.build;
+ info.channel = "";
+ if (result.channel)
+ info.channel = result.channel;
+ BNFreeString(result.channel);
+ return info;
+}
+
+
string BinaryNinja::GetLicensedUserEmail()
{
char* str = BNGetLicensedUserEmail();