summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-07-20 10:53:14 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2019-07-20 10:53:14 +0100
commit4c25da8a7ba7437657c3e2da592145113d3532f4 (patch)
tree40f0468135089ff4f9e967bf8ee74b020bee67f7 /src/main.cpp
downloadnetfs-gitfs-4c25da8a7ba7437657c3e2da592145113d3532f4.tar.bz2
netfs-gitfs-4c25da8a7ba7437657c3e2da592145113d3532f4.tar.xz
netfs-gitfs-4c25da8a7ba7437657c3e2da592145113d3532f4.zip
Initial commit
Not a lot of stuff, hard coded paths, tests against /usr/portage
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
new file mode 100644
index 0000000..0666a3c
--- /dev/null
+++ b/src/main.cpp
@@ -0,0 +1,28 @@
+#include <icetrayService.h>
+#include <git2.h>
+#include <factory.h>
+#include <icecube.h>
+#include "repoList.h"
+
+namespace GitFS {
+ class Main : public IceTray::Service {
+ public:
+ Main()
+ {
+ git_libgit2_init();
+ }
+
+ ~Main()
+ {
+ git_libgit2_shutdown();
+ }
+
+ void addObjects(const std::string &, const Ice::CommunicatorPtr & ic, const Ice::StringSeq &, const Ice::ObjectAdapterPtr & adp) override
+ {
+ IceTray::Cube::addObject<NetFS::Service, RepoList>(adp, "Service", ic->getProperties());
+ }
+ };
+
+ NAMEDFACTORY("default", Main, IceTray::ServiceFactory);
+}
+