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

Unified Diff: third_party/chrome/idl/sync_file_system.idl

Issue 12261015: Import chrome idl into third_party (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | « third_party/chrome/idl/storage.json ('k') | third_party/chrome/idl/system_indicator.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/chrome/idl/sync_file_system.idl
diff --git a/third_party/chrome/idl/sync_file_system.idl b/third_party/chrome/idl/sync_file_system.idl
new file mode 100644
index 0000000000000000000000000000000000000000..4a657445e56cd014a4349771bb5941ea44e68226
--- /dev/null
+++ b/third_party/chrome/idl/sync_file_system.idl
@@ -0,0 +1,104 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+namespace syncFileSystem {
+
+ enum SyncOperationResult {
+ added, updated, deleted, conflicted
+ };
+
+ enum SyncStateStatus {
+ // The sync service is being initialized (e.g. restoring data from the
+ // database, checking connectivity and authenticating to the service etc).
+ initializing,
+
+ // The sync service is up and running.
+ running,
+
+ // The sync service is not synchronizing files because the remote service
+ // needs to be authenticated by the user to proceed.
+ authentication_required,
+
+ // The sync service is not synchronizing files because the remote service
+ // is (temporarily) unavailable due to some recoverable errors, e.g.
+ // network is offline, the remote service is down or not
+ // reachable etc. More details should be given by |description| parameter
+ // in OnSyncStateUpdated (which could contain service-specific details).
+ temporary_unavailable,
+
+ // The sync service is disabled and the content will never sync.
+ // (E.g. this could happen when the user has no account on
+ // the remote service or the sync service has had an unrecoverable
+ // error.)
+ disabled
+ };
+
+ enum FileSyncStatus {
+ // Not conflicting and has no pending local changes.
+ synced,
+
+ // Has one or more pending local changes that haven't been synchronized.
+ pending,
+
+ // File conflicts with remote version and must be resolved manually.
+ conflicting
+ };
+
+ dictionary StorageInfo {
+ long usage_bytes;
+ long quota_bytes;
+ };
+
+ dictionary SyncState {
+ DOMString service_name; // i.e. ‘drive’
+ SyncStateStatus state;
+ DOMString description;
+ };
+
+ // [nodoc] A callback type for requestFileSystem.
+ callback GetFileSystemCallback =
+ void ([instanceOf=DOMFileSystem] object fileSystem);
+
+ // [nodoc] A callback type for getUsageAndQuota.
+ callback QuotaAndUsageCallback = void (StorageInfo info);
+
+ // Returns true if operation was successful.
+ callback DeleteFileSystemCallback = void (boolean result);
+
+ // [nodoc] A callback type for getFileSyncStatus.
+ callback GetFileSyncStatusCallback = void (FileSyncStatus status);
+
+ interface Functions {
+ // Get a sync file system backed by |serviceName|.
+ // Calling this multiple times from the same app with the same |serviceName|
+ // will return the same handle to the same file system.
+ static void requestFileSystem(DOMString serviceName,
+ GetFileSystemCallback callback);
+
+ // Get usage and quota in bytes for sync file system with |serviceName|.
+ static void getUsageAndQuota([instanceOf=DOMFileSystem] object fileSystem,
+ QuotaAndUsageCallback callback);
+
+ // Deletes everything in the syncable filesystem.
+ static void deleteFileSystem([instanceOf=DOMFileSystem] object fileSystem,
+ DeleteFileSystemCallback callback);
+
+ // Get the FileSyncStatus for the given |fileEntry|.
+ static void getFileSyncStatus([instanceOf=FileEntry] object fileEntry,
+ GetFileSyncStatusCallback callback);
+ };
+
+ interface Events {
+ // Fired when an error or other state change has happened in the
+ // sync backend. (e.g. the sync is temporarily disabled due to
+ // network or authentication error etc).
+ static void onSyncStateChanged(SyncState detail);
+
+ // Fired when a file has been updated by the background sync service.
+ // TODO(calvinlo): Convert |file_entry_path| from to Webkit FileEntry.
+ static void onFileSynced(DOMString file_entry_path,
+ SyncOperationResult result);
+ };
+
+};
« no previous file with comments | « third_party/chrome/idl/storage.json ('k') | third_party/chrome/idl/system_indicator.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698