OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef COMPONENTS_SYNC_SYNCABLE_SYNCABLE_ENUM_CONVERSIONS_H_ | 5 #ifndef COMPONENTS_SYNC_SYNCABLE_SYNCABLE_ENUM_CONVERSIONS_H_ |
6 #define COMPONENTS_SYNC_SYNCABLE_SYNCABLE_ENUM_CONVERSIONS_H_ | 6 #define COMPONENTS_SYNC_SYNCABLE_SYNCABLE_ENUM_CONVERSIONS_H_ |
7 | 7 |
8 // Keep this file in sync with entry_kernel.h. | 8 // Keep this file in sync with entry_kernel.h. |
9 | 9 |
10 #include "components/sync/base/sync_export.h" | |
11 #include "components/sync/syncable/entry_kernel.h" | 10 #include "components/sync/syncable/entry_kernel.h" |
12 | 11 |
13 // Utility functions to get the string equivalent for some syncable | 12 // Utility functions to get the string equivalent for some syncable |
14 // enums. | 13 // enums. |
15 | 14 |
16 namespace syncer { | 15 namespace syncer { |
17 namespace syncable { | 16 namespace syncable { |
18 | 17 |
19 // The returned strings (which don't have to be freed) are in ASCII. | 18 // The returned strings (which don't have to be freed) are in ASCII. |
20 // The result of passing in an invalid enum value is undefined. | 19 // The result of passing in an invalid enum value is undefined. |
21 | 20 |
22 SYNC_EXPORT const char* GetMetahandleFieldString( | 21 const char* GetMetahandleFieldString(MetahandleField metahandle_field); |
23 MetahandleField metahandle_field); | |
24 | 22 |
25 SYNC_EXPORT const char* GetBaseVersionString(BaseVersion base_version); | 23 const char* GetBaseVersionString(BaseVersion base_version); |
26 | 24 |
27 SYNC_EXPORT const char* GetInt64FieldString(Int64Field int64_field); | 25 const char* GetInt64FieldString(Int64Field int64_field); |
28 | 26 |
29 SYNC_EXPORT const char* GetTimeFieldString(TimeField time_field); | 27 const char* GetTimeFieldString(TimeField time_field); |
30 | 28 |
31 SYNC_EXPORT const char* GetIdFieldString(IdField id_field); | 29 const char* GetIdFieldString(IdField id_field); |
32 | 30 |
33 SYNC_EXPORT const char* GetIndexedBitFieldString( | 31 const char* GetIndexedBitFieldString(IndexedBitField indexed_bit_field); |
34 IndexedBitField indexed_bit_field); | |
35 | 32 |
36 SYNC_EXPORT const char* GetIsDelFieldString(IsDelField is_del_field); | 33 const char* GetIsDelFieldString(IsDelField is_del_field); |
37 | 34 |
38 SYNC_EXPORT const char* GetBitFieldString(BitField bit_field); | 35 const char* GetBitFieldString(BitField bit_field); |
39 | 36 |
40 SYNC_EXPORT const char* GetStringFieldString(StringField string_field); | 37 const char* GetStringFieldString(StringField string_field); |
41 | 38 |
42 SYNC_EXPORT const char* GetProtoFieldString(ProtoField proto_field); | 39 const char* GetProtoFieldString(ProtoField proto_field); |
43 | 40 |
44 SYNC_EXPORT const char* GetUniquePositionFieldString( | 41 const char* GetUniquePositionFieldString(UniquePositionField position_field); |
45 UniquePositionField position_field); | |
46 | 42 |
47 SYNC_EXPORT const char* GetAttachmentMetadataFieldString( | 43 const char* GetAttachmentMetadataFieldString( |
48 AttachmentMetadataField attachment_metadata_field); | 44 AttachmentMetadataField attachment_metadata_field); |
49 | 45 |
50 SYNC_EXPORT const char* GetBitTempString(BitTemp bit_temp); | 46 const char* GetBitTempString(BitTemp bit_temp); |
51 | 47 |
52 } // namespace syncable | 48 } // namespace syncable |
53 } // namespace syncer | 49 } // namespace syncer |
54 | 50 |
55 #endif // COMPONENTS_SYNC_SYNCABLE_SYNCABLE_ENUM_CONVERSIONS_H_ | 51 #endif // COMPONENTS_SYNC_SYNCABLE_SYNCABLE_ENUM_CONVERSIONS_H_ |
OLD | NEW |