diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 28 |
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); +} + |