]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- |
2 | // vim: ts=8 sw=2 smarttab | |
3 | /* | |
4 | * Ceph distributed storage system | |
5 | * | |
6 | * Copyright (C) 2015 Mirantis, Inc. | |
7 | * | |
8 | * Author: Alyona Kiseleva <akiselyova@mirantis.com> | |
9 | * | |
10 | * | |
11 | * This library is free software; you can redistribute it and/or | |
12 | * modify it under the terms of the GNU Lesser General Public | |
13 | * License as published by the Free Software Foundation; either | |
14 | * version 2.1 of the License, or (at your option) any later version. | |
15 | * | |
16 | */ | |
17 | ||
18 | #ifndef COMPRESSION_PLUGIN_H | |
19 | #define COMPRESSION_PLUGIN_H | |
20 | ||
21 | #include <iostream> | |
22 | #include "common/Mutex.h" | |
23 | #include "common/PluginRegistry.h" | |
24 | #include "Compressor.h" | |
25 | ||
26 | namespace ceph { | |
27 | ||
28 | class CompressionPlugin : public Plugin { | |
29 | public: | |
30 | CompressorRef compressor; | |
31 | ||
32 | explicit CompressionPlugin(CephContext *cct) : Plugin(cct), | |
33 | compressor(0) | |
34 | {} | |
35 | ||
36 | ~CompressionPlugin() override {} | |
37 | ||
38 | virtual int factory(CompressorRef *cs, | |
39 | std::ostream *ss) = 0; | |
40 | ||
41 | virtual const char* name() {return "CompressionPlugin";} | |
42 | }; | |
43 | ||
44 | } | |
45 | ||
46 | #endif |