Home | History | Annotate | Download | only in syncable
      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.
      4 
      5 #ifndef SYNC_SYNCABLE_SYNCABLE_ENUM_CONVERSIONS_H_
      6 #define SYNC_SYNCABLE_SYNCABLE_ENUM_CONVERSIONS_H_
      7 
      8 // Keep this file in sync with entry_kernel.h.
      9 
     10 #include "sync/base/sync_export.h"
     11 #include "sync/syncable/entry_kernel.h"
     12 
     13 // Utility functions to get the string equivalent for some syncable
     14 // enums.
     15 
     16 namespace syncer {
     17 namespace syncable {
     18 
     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.
     21 
     22 SYNC_EXPORT_PRIVATE const char* GetMetahandleFieldString(
     23     MetahandleField metahandle_field);
     24 
     25 SYNC_EXPORT_PRIVATE const char* GetBaseVersionString(BaseVersion base_version);
     26 
     27 SYNC_EXPORT_PRIVATE const char* GetInt64FieldString(Int64Field int64_field);
     28 
     29 SYNC_EXPORT_PRIVATE const char* GetTimeFieldString(TimeField time_field);
     30 
     31 SYNC_EXPORT_PRIVATE const char* GetIdFieldString(IdField id_field);
     32 
     33 SYNC_EXPORT_PRIVATE const char* GetIndexedBitFieldString(
     34     IndexedBitField indexed_bit_field);
     35 
     36 SYNC_EXPORT_PRIVATE const char* GetIsDelFieldString(IsDelField is_del_field);
     37 
     38 SYNC_EXPORT_PRIVATE const char* GetBitFieldString(BitField bit_field);
     39 
     40 SYNC_EXPORT_PRIVATE const char* GetStringFieldString(StringField string_field);
     41 
     42 SYNC_EXPORT_PRIVATE const char* GetProtoFieldString(ProtoField proto_field);
     43 
     44 SYNC_EXPORT_PRIVATE const char* GetUniquePositionFieldString(
     45     UniquePositionField position_field);
     46 
     47 SYNC_EXPORT_PRIVATE const char* GetAttachmentMetadataFieldString(
     48     AttachmentMetadataField attachment_metadata_field);
     49 
     50 SYNC_EXPORT_PRIVATE const char* GetBitTempString(BitTemp bit_temp);
     51 
     52 }  // namespace syncable
     53 }  // namespace syncer
     54 
     55 #endif  // SYNC_SYNCABLE_SYNCABLE_ENUM_CONVERSIONS_H_
     56