summaryrefslogtreecommitdiff
path: root/src/main.cpp
blob: 59fa299678d7fa2c01cc76d771efac3678806747 (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 "repoList.h"
#include <factory.h>
#include <git2.h>
#include <icecube.h>
#include <icetrayService.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);
}