Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file defines the "sync API", an interface to the syncer | 5 // This file defines the "sync API", an interface to the syncer |
| 6 // backend that exposes (1) the core functionality of maintaining a consistent | 6 // backend that exposes (1) the core functionality of maintaining a consistent |
| 7 // local snapshot of a hierarchical object set; (2) a means to transactionally | 7 // local snapshot of a hierarchical object set; (2) a means to transactionally |
| 8 // access and modify those objects; (3) a means to control client/server | 8 // access and modify those objects; (3) a means to control client/server |
| 9 // synchronization tasks, namely: pushing local object modifications to a | 9 // synchronization tasks, namely: pushing local object modifications to a |
| 10 // server, pulling nonlocal object modifications from a server to this client, | 10 // server, pulling nonlocal object modifications from a server to this client, |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 41 #include "base/basictypes.h" | 41 #include "base/basictypes.h" |
| 42 #include "build/build_config.h" | 42 #include "build/build_config.h" |
| 43 | 43 |
| 44 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
| 45 typedef wchar_t sync_char16; | 45 typedef wchar_t sync_char16; |
| 46 #else | 46 #else |
| 47 typedef uint16 sync_char16; | 47 typedef uint16 sync_char16; |
| 48 #endif | 48 #endif |
| 49 | 49 |
| 50 // The MSVC compiler for Windows requires that any classes exported by, or | 50 // The MSVC compiler for Windows requires that any classes exported by, or |
| 51 // imported from, a dynamic library be decorated with the following fanciness. | 51 // imported from, a dynamic library be marked with an appropriate |
|
tim (not reviewing)
2009/10/05 23:51:27
You be using some unaccurate engrish there matey.
| |
| 52 #if defined(OS_WIN) | 52 // __declspec() decoration. However, we currently use static linkage |
| 53 #if COMPILING_SYNCAPI_LIBRARY | 53 // on all platforms. |
| 54 #define SYNC_EXPORT __declspec(dllexport) | |
| 55 #elif COMPILING_SYNCAPI_STUB | |
| 56 #define SYNC_EXPORT | 54 #define SYNC_EXPORT |
| 57 #else | |
| 58 #define SYNC_EXPORT __declspec(dllimport) | |
| 59 #endif | |
| 60 #else | |
| 61 #define SYNC_EXPORT | |
| 62 #endif // OS_WIN | |
| 63 | 55 |
| 64 // Forward declarations of internal class types so that sync API objects | 56 // Forward declarations of internal class types so that sync API objects |
| 65 // may have opaque pointers to these types. | 57 // may have opaque pointers to these types. |
| 66 namespace syncable { | 58 namespace syncable { |
| 67 class BaseTransaction; | 59 class BaseTransaction; |
| 68 class DirectoryManager; | 60 class DirectoryManager; |
| 69 class Entry; | 61 class Entry; |
| 70 class MutableEntry; | 62 class MutableEntry; |
| 71 class ReadTransaction; | 63 class ReadTransaction; |
| 72 class ScopedDirLookup; | 64 class ScopedDirLookup; |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 691 // Subclasses should implement to invoke DoWork on |visitor| once on a thread | 683 // Subclasses should implement to invoke DoWork on |visitor| once on a thread |
| 692 // appropriate for data model modifications. | 684 // appropriate for data model modifications. |
| 693 // While it doesn't hurt, the impl does not need to be re-entrant (for now). | 685 // While it doesn't hurt, the impl does not need to be re-entrant (for now). |
| 694 // Note: |visitor| is owned by caller. | 686 // Note: |visitor| is owned by caller. |
| 695 virtual void CallDoWorkFromModelSafeThreadAndWait(Visitor* visitor) = 0; | 687 virtual void CallDoWorkFromModelSafeThreadAndWait(Visitor* visitor) = 0; |
| 696 }; | 688 }; |
| 697 | 689 |
| 698 } // namespace sync_api | 690 } // namespace sync_api |
| 699 | 691 |
| 700 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ | 692 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ |
| OLD | NEW |