Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Unified Diff: cros-disks-server-impl.h

Issue 6824032: First batch of cros-disk changes (Closed) Base URL: ssh://gitrw.chromium.org:9222/cros-disks.git@master
Patch Set: adds set_ and removes j's Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cros-disks.xml ('k') | cros-disks-server-impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cros-disks-server-impl.h
diff --git a/cros-disks-server-impl.h b/cros-disks-server-impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..cd2af8dc7f2f08e6cedeeb0f45f29715f8e75a96
--- /dev/null
+++ b/cros-disks-server-impl.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CROS_DISKS_SERVER_IMPL_H__
+#define CROS_DISKS_SERVER_IMPL_H__
+
+#include "cros-disks-server.h"
+#include "disk.h"
+
+#include <string>
+#include <vector>
+
+namespace cros_disks {
+
+// The d-bus server for the cros-disks daemon.
+//
+// Example Usage:
+//
+// DBus::Connection server_conn = DBus::Connection::SystemBus();
+// server_conn.request_name("org.chromium.CrosDisks");
+// CrosDisksServer* server = new(std::nothrow) CrosDisksServer(server_conn);
+//
+// At this point the server should be attached to the main loop.
+//
+class CrosDisksServer : public org::chromium::CrosDisks_adaptor,
+ public DBus::IntrospectableAdaptor,
+ public DBus::ObjectAdaptor {
+ public:
+ CrosDisksServer(DBus::Connection& connection);
+ virtual ~CrosDisksServer();
+
+ // A method for checking if the daemon is running. Always returns true.
+ virtual bool IsAlive(DBus::Error& error); // NOLINT
+
+ // Unmounts a device when invoked.
+ virtual void FilesystemUnmount(const std::vector<std::string>& mountOptions,
+ DBus::Error& error); // NOLINT
+
+ // Mounts a device when invoked.
+ virtual void FilesystemMount(const std::string& nullArgument,
+ const std::vector<std::string>& mountOptions,
+ DBus::Error& error); // NOLINT
+
+ // Returns a description of every disk device attached to the sytem.
+ virtual DBusDisks GetAll(DBus::Error& error); // NOLINT
+};
+} // namespace cros_disks
+
+#endif // CROS_DISKS_SERVER_IMPL_H__
« no previous file with comments | « cros-disks.xml ('k') | cros-disks-server-impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698