~gordallott/unity/newbg

« back to all changes in this revision

Viewing changes to launcher/Volume.h

  • Committer: Ugo Riboni
  • Date: 2012-08-31 09:15:33 UTC
  • mfrom: (2637.3.7 unity)
  • mto: (2637.3.10 unity)
  • mto: This revision was merged to the branch mainline in revision 2641.
  • Revision ID: ugo.riboni@canonical.com-20120831091533-60o9ph7zhfxxi6md
Merge changes from trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
 
2
/*
 
3
 * Copyright (C) 2012 Canonical Ltd
 
4
 *
 
5
 * This program is free software: you can redistribute it and/or modify
 
6
 * it under the terms of the GNU General Public License version 3 as
 
7
 * published by the Free Software Foundation.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
16
 *
 
17
 * Authored by: Andrea Azzarone <andrea.azzarone@canonical.com>
 
18
 */
 
19
 
 
20
#ifndef UNITYSHELL_VOLUME_H
 
21
#define UNITYSHELL_VOLUME_H
 
22
 
 
23
#include <boost/noncopyable.hpp>
 
24
#include <memory>
 
25
#include <sigc++/signal.h>
 
26
#include <sigc++/trackable.h>
 
27
#include <string>
 
28
 
 
29
namespace unity
 
30
{
 
31
namespace launcher
 
32
{
 
33
 
 
34
class Volume : private boost::noncopyable, public sigc::trackable
 
35
{
 
36
public:
 
37
  typedef std::shared_ptr<Volume> Ptr;
 
38
 
 
39
  virtual ~Volume() {}
 
40
 
 
41
  virtual bool CanBeEjected() const = 0;
 
42
  virtual bool CanBeRemoved() const = 0;
 
43
  virtual bool CanBeStopped() const = 0;
 
44
  virtual std::string GetName() const = 0;
 
45
  virtual std::string GetIconName() const = 0;
 
46
  virtual std::string GetIdentifier() const = 0;
 
47
  virtual bool HasSiblings() const = 0;
 
48
  virtual bool IsMounted() const = 0;
 
49
 
 
50
  virtual void EjectAndShowNotification() = 0;
 
51
  virtual void MountAndOpenInFileManager() = 0;
 
52
  virtual void StopDrive() = 0;
 
53
  virtual void Unmount() = 0;
 
54
 
 
55
  sigc::signal<void> changed;
 
56
  sigc::signal<void> removed;
 
57
};
 
58
 
 
59
}
 
60
}
 
61
 
 
62
#endif