~ps-jenkins/indicator-transfer/ubuntu-vivid-proposed

« back to all changes in this revision

Viewing changes to include/transfer/view-console.h

  • Committer: Charles Kerr
  • Date: 2014-06-17 01:36:16 UTC
  • mto: This revision was merged to the branch mainline in revision 2.
  • Revision ID: charles.kerr@canonical.com-20140617013616-7fcd22wh3hbgaovh
code drop

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2014 Canonical Ltd.
 
3
 *
 
4
 * This program is free software: you can redistribute it and/or modify it
 
5
 * under the terms of the GNU General Public License version 3, as published
 
6
 * by the Free Software Foundation.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful, but
 
9
 * WITHOUT ANY WARRANTY; without even the implied warranties of
 
10
 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
11
 * PURPOSE.  See the GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License along
 
14
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 *
 
16
 * Authors:
 
17
 *   Charles Kerr <charles.kerr@canonical.com>
 
18
 */
 
19
 
 
20
#ifndef INDICATOR_TRANSFER_VIEW_CONSOLE_H
 
21
#define INDICATOR_TRANSFER_VIEW_CONSOLE_H
 
22
 
 
23
#include <transfer/view.h>
 
24
 
 
25
#include <core/connection.h>
 
26
 
 
27
#include <memory> // shared_ptr
 
28
#include <set>
 
29
 
 
30
namespace unity {
 
31
namespace indicator {
 
32
namespace transfer {
 
33
 
 
34
/**
 
35
 * \brief a debugging view that dumps output to the console
 
36
 */
 
37
class ConsoleView: public View
 
38
{
 
39
public:
 
40
    ConsoleView(const std::shared_ptr<Model>&, const std::shared_ptr<Controller>&);
 
41
    ~ConsoleView();
 
42
    void set_controller(const std::shared_ptr<Controller>&);
 
43
    void set_model(const std::shared_ptr<Model>&);
 
44
 
 
45
private:
 
46
    std::shared_ptr<Model> m_model;
 
47
    std::shared_ptr<Controller> m_controller;
 
48
    std::set<core::ScopedConnection> m_connections;
 
49
    static gboolean on_timer (gpointer);
 
50
};
 
51
 
 
52
} // namespace transfer
 
53
} // namespace indicator
 
54
} // namespace unity
 
55
 
 
56
#endif // INDICATOR_TRANSFER_VIEW_H