summaryrefslogtreecommitdiff
path: root/update.cpp
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2015-10-28 22:28:48 -0400
committerRusty Wagner <rusty@vector35.com>2015-10-28 22:29:07 -0400
commit72dba52eb3d90abae437e4658700167f47a05cf5 (patch)
treef6d8f320b049113ee5e07c6a33ac31f5958576a6 /update.cpp
parent9fabf9157240d57470f9eb38448a329e5a31ec30 (diff)
Implement auto update functionality
Diffstat (limited to 'update.cpp')
-rw-r--r--update.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/update.cpp b/update.cpp
index 90e3477b..1586c363 100644
--- a/update.cpp
+++ b/update.cpp
@@ -141,3 +141,42 @@ vector<UpdateVersion> UpdateVersion::GetChannelVersions(const string& channel)
BNFreeUpdateChannelVersionList(versions, count);
return result;
}
+
+
+bool BinaryNinja::AreAutoUpdatesEnabled()
+{
+ return BNAreAutoUpdatesEnabled();
+}
+
+
+void BinaryNinja::SetAutoUpdatesEnabled(bool enabled)
+{
+ BNSetAutoUpdatesEnabled(enabled);
+}
+
+
+uint64_t BinaryNinja::GetTimeSinceLastUpdateCheck()
+{
+ return BNGetTimeSinceLastUpdateCheck();
+}
+
+
+void BinaryNinja::UpdatesChecked()
+{
+ BNUpdatesChecked();
+}
+
+
+string BinaryNinja::GetActiveUpdateChannel()
+{
+ char* channel = BNGetActiveUpdateChannel();
+ string result = channel;
+ BNFreeString(channel);
+ return result;
+}
+
+
+void BinaryNinja::SetActiveUpdateChannel(const string& channel)
+{
+ BNSetActiveUpdateChannel(channel.c_str());
+}