summaryrefslogtreecommitdiff
path: root/src/main.cpp
blob: 0666a3c8475426cb08daf71becd264aed9244bce (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
#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);
}