7 |
|
#ifndef _Mounter_hpp_ |
8 |
|
#define _Mounter_hpp_ |
9 |
|
|
10 |
– |
#include "Daemon.hpp" |
10 |
|
#include "Share.hpp" |
11 |
|
|
12 |
|
#ifdef MENES_PRAGMA_ONCE |
13 |
|
#pragma once |
14 |
|
#endif |
15 |
|
|
16 |
< |
class Mounter : public Daemon |
16 |
> |
struct Mounter |
17 |
|
{ |
18 |
< |
private: |
19 |
< |
const api::Path& config; |
21 |
< |
#ifdef __FreeBSD__ |
22 |
< |
static ext::String secret; |
23 |
< |
#endif |
24 |
< |
virtual void load(); |
25 |
< |
virtual void run(); |
26 |
< |
public: |
27 |
< |
Mounter(const api::Path& config); |
28 |
< |
virtual ~Mounter(); |
18 |
> |
static bool workable(const Share& share) { return !share.mounted() && share.mountable(); } |
19 |
> |
static int work(const Share& share); |
20 |
|
}; |
21 |
|
|
22 |
|
#endif//_Mounter_hpp_ |