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
3 // found in the LICENSE file.
5 #ifndef SYNC_SYNCABLE_SYNCABLE_ENUM_CONVERSIONS_H_
6 #define SYNC_SYNCABLE_SYNCABLE_ENUM_CONVERSIONS_H_
8 // Keep this file in sync with entry_kernel.h.
10 #include "sync/base/sync_export.h"
11 #include "sync/syncable/entry_kernel.h"
13 // Utility functions to get the string equivalent for some syncable
19 // 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.
22 SYNC_EXPORT_PRIVATE
const char* GetMetahandleFieldString(
23 MetahandleField metahandle_field
);
25 SYNC_EXPORT_PRIVATE
const char* GetBaseVersionString(BaseVersion base_version
);
27 SYNC_EXPORT_PRIVATE
const char* GetInt64FieldString(Int64Field int64_field
);
29 SYNC_EXPORT_PRIVATE
const char* GetTimeFieldString(TimeField time_field
);
31 SYNC_EXPORT_PRIVATE
const char* GetIdFieldString(IdField id_field
);
33 SYNC_EXPORT_PRIVATE
const char* GetIndexedBitFieldString(
34 IndexedBitField indexed_bit_field
);
36 SYNC_EXPORT_PRIVATE
const char* GetIsDelFieldString(IsDelField is_del_field
);
38 SYNC_EXPORT_PRIVATE
const char* GetBitFieldString(BitField bit_field
);
40 SYNC_EXPORT_PRIVATE
const char* GetStringFieldString(StringField string_field
);
42 SYNC_EXPORT_PRIVATE
const char* GetProtoFieldString(ProtoField proto_field
);
44 SYNC_EXPORT_PRIVATE
const char* GetOrdinalFieldString(
45 OrdinalField ordinal_field
);
47 SYNC_EXPORT_PRIVATE
const char* GetBitTempString(BitTemp bit_temp
);
49 } // namespace syncable
52 #endif // SYNC_SYNCABLE_SYNCABLE_ENUM_CONVERSIONS_H_