~unity-api-team/unity-scopes-api/child-scopes-option

« back to all changes in this revision

Viewing changes to include/scopes/internal/zmq_middleware/ZmqConfig.h

  • Committer: Michi Henning
  • Date: 2013-11-19 02:51:46 UTC
  • mto: This revision was merged to the branch mainline in revision 62.
  • Revision ID: michi.henning@canonical.com-20131119025146-kglcalpphl4ozzk7
Fixed scoperegistry to use new scoperunner and to figure out which scopes to run from config files.
Still to do:
- deal with overrides and OEM scopes, particularly the grouping aspect.
- SignalThread needs to invoke a callback for clean shut-down on receipt of SIGINT.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2013 Canonical Ltd
 
3
 *
 
4
 * This program is free software: you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License version 3 as
 
6
 * published by the Free Software Foundation.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 *
 
16
 * Authored by: Michi Henning <michi.henning@canonical.com>
 
17
 */
 
18
 
 
19
#ifndef UNITY_API_SCOPES_INTERNAL_ZMQCONFIG_H
 
20
#define UNITY_API_SCOPES_INTERNAL_ZMQCONFIG_H
 
21
 
 
22
#include <scopes/internal/ConfigBase.h>
 
23
 
 
24
#include <mutex>
 
25
 
 
26
namespace unity
 
27
{
 
28
 
 
29
namespace api
 
30
{
 
31
 
 
32
namespace scopes
 
33
{
 
34
 
 
35
namespace internal
 
36
{
 
37
 
 
38
class ZmqConfig : public ConfigBase
 
39
{
 
40
public:
 
41
    static const char* ZMQ_CONFIG_GROUP;
 
42
 
 
43
    ZmqConfig(std::string const& configfile);
 
44
    ~ZmqConfig() noexcept;
 
45
 
 
46
    std::string public_dir() const;
 
47
    std::string private_dir() const;
 
48
 
 
49
private:
 
50
    std::string public_dir_;
 
51
    mutable std::string private_dir_;
 
52
    mutable std::mutex mutex_;
 
53
};
 
54
 
 
55
} // namespace internal
 
56
 
 
57
} // namespace scopes
 
58
 
 
59
} // namespace api
 
60
 
 
61
} // namespace unity
 
62
 
 
63
#endif