summaryrefslogtreecommitdiff
path: root/src/main.cpp
blob: c6b1c90cf248d6528caf37f6da71cf94408c419f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#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() override
			{
				git_libgit2_shutdown();
			}

			Main(const Main &) = delete;
			Main(Main &&) = delete;

			Main & operator=(const Main &) = delete;
			Main & operator=(Main &&) = delete;

			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",
						std::move(ic->getProperties()));
			}
	};

	NAMEDFACTORY("default", Main, IceTray::ServiceFactory);
}