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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 typedef wchar_t sync_char16; | 44 typedef wchar_t sync_char16; |
45 #else | 45 #else |
46 typedef uint16 sync_char16; | 46 typedef uint16 sync_char16; |
47 #endif | 47 #endif |
48 | 48 |
49 // The MSVC compiler for Windows requires that any classes exported by, or | 49 // The MSVC compiler for Windows requires that any classes exported by, or |
50 // imported from, a dynamic library be decorated with the following fanciness. | 50 // imported from, a dynamic library be decorated with the following fanciness. |
51 #if (defined(OS_WIN) || defined(OS_WINDOWS)) | 51 #if (defined(OS_WIN) || defined(OS_WINDOWS)) |
52 #if COMPILING_SYNCAPI_LIBRARY | 52 #if COMPILING_SYNCAPI_LIBRARY |
53 #define SYNC_EXPORT __declspec(dllexport) | 53 #define SYNC_EXPORT __declspec(dllexport) |
| 54 #elif COMPILING_SYNCAPI_STUB |
| 55 #define SYNC_EXPORT |
54 #else | 56 #else |
55 #define SYNC_EXPORT __declspec(dllimport) | 57 #define SYNC_EXPORT __declspec(dllimport) |
56 #endif | 58 #endif |
57 #else | 59 #else |
58 #define SYNC_EXPORT | 60 #define SYNC_EXPORT |
59 #endif // OS_WIN || OS_WINDOWS | 61 #endif // OS_WIN || OS_WINDOWS |
60 | 62 |
61 // Forward declarations of internal class types so that sync API objects | 63 // Forward declarations of internal class types so that sync API objects |
62 // may have opaque pointers to these types. | 64 // may have opaque pointers to these types. |
63 namespace syncable { | 65 namespace syncable { |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 // Subclasses should implement to invoke DoWork on |visitor| once on a thread | 702 // Subclasses should implement to invoke DoWork on |visitor| once on a thread |
701 // appropriate for data model modifications. | 703 // appropriate for data model modifications. |
702 // While it doesn't hurt, the impl does not need to be re-entrant (for now). | 704 // While it doesn't hurt, the impl does not need to be re-entrant (for now). |
703 // Note: |visitor| is owned by caller. | 705 // Note: |visitor| is owned by caller. |
704 virtual void CallDoWorkFromModelSafeThreadAndWait(Visitor* visitor) = 0; | 706 virtual void CallDoWorkFromModelSafeThreadAndWait(Visitor* visitor) = 0; |
705 }; | 707 }; |
706 | 708 |
707 } // namespace sync_api | 709 } // namespace sync_api |
708 | 710 |
709 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ | 711 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ |
OLD | NEW |