Index: sync/internal_api/public/base/model_type.h |
diff --git a/sync/internal_api/public/base/model_type.h b/sync/internal_api/public/base/model_type.h |
index 25baf6c3f5260da50bf7c990ef2b7b7ab933b829..e233b593605616a357425178b59276d3cfe19ba9 100644 |
--- a/sync/internal_api/public/base/model_type.h |
+++ b/sync/internal_api/public/base/model_type.h |
@@ -14,6 +14,7 @@ |
#include "base/logging.h" |
#include "base/time.h" |
+#include "sync/base/sync_export.h" |
#include "sync/internal_api/public/base/enum_set.h" |
namespace base { |
@@ -100,74 +101,80 @@ inline ModelType ModelTypeFromInt(int i) { |
return static_cast<ModelType>(i); |
} |
-void AddDefaultFieldValue(ModelType datatype, |
- sync_pb::EntitySpecifics* specifics); |
+SYNC_EXPORT void AddDefaultFieldValue(ModelType datatype, |
+ sync_pb::EntitySpecifics* specifics); |
// Extract the model type of a SyncEntity protocol buffer. ModelType is a |
// local concept: the enum is not in the protocol. The SyncEntity's ModelType |
// is inferred from the presence of particular datatype field in the |
// entity specifics. |
-ModelType GetModelType(const sync_pb::SyncEntity& sync_entity); |
+SYNC_EXPORT ModelType GetModelType(const sync_pb::SyncEntity& sync_entity); |
// Extract the model type from an EntitySpecifics field. Note that there |
// are some ModelTypes (like TOP_LEVEL_FOLDER) that can't be inferred this way; |
// prefer using GetModelType where possible. |
-ModelType GetModelTypeFromSpecifics(const sync_pb::EntitySpecifics& specifics); |
+SYNC_EXPORT ModelType GetModelTypeFromSpecifics( |
+ const sync_pb::EntitySpecifics& specifics); |
// If this returns false, we shouldn't bother maintaining a position |
// value (sibling ordering) for this item. |
-bool ShouldMaintainPosition(ModelType model_type); |
+SYNC_EXPORT bool ShouldMaintainPosition(ModelType model_type); |
rlarocque
2012/07/12 17:45:56
Does this need to be exported? I don't think it's
|
// Determine a model type from the field number of its associated |
// EntitySpecifics field. |
-ModelType GetModelTypeFromSpecificsFieldNumber(int field_number); |
+// |
+// TODO(akalin): Move this to a more private place? |
+SYNC_EXPORT ModelType GetModelTypeFromSpecificsFieldNumber(int field_number); |
// Return the field number of the EntitySpecifics field associated with |
// a model type. |
-int GetSpecificsFieldNumberFromModelType(ModelType model_type); |
+SYNC_EXPORT_PRIVATE int GetSpecificsFieldNumberFromModelType( |
+ ModelType model_type); |
// TODO(sync): The functions below badly need some cleanup. |
// Returns a pointer to a string with application lifetime that represents |
// the name of |model_type|. |
-const char* ModelTypeToString(ModelType model_type); |
+SYNC_EXPORT const char* ModelTypeToString(ModelType model_type); |
// Handles all model types, and not just real ones. |
// |
// Caller takes ownership of returned value. |
-base::StringValue* ModelTypeToValue(ModelType model_type); |
+SYNC_EXPORT base::StringValue* ModelTypeToValue(ModelType model_type); |
// Converts a Value into a ModelType - complement to ModelTypeToValue(). |
-ModelType ModelTypeFromValue(const base::Value& value); |
+SYNC_EXPORT ModelType ModelTypeFromValue(const base::Value& value); |
// Returns the ModelType corresponding to the name |model_type_string|. |
-ModelType ModelTypeFromString(const std::string& model_type_string); |
+SYNC_EXPORT ModelType ModelTypeFromString( |
+ const std::string& model_type_string); |
-std::string ModelTypeSetToString(ModelTypeSet model_types); |
+SYNC_EXPORT std::string ModelTypeSetToString(ModelTypeSet model_types); |
// Caller takes ownership of returned list. |
-base::ListValue* ModelTypeSetToValue(ModelTypeSet model_types); |
+SYNC_EXPORT base::ListValue* ModelTypeSetToValue(ModelTypeSet model_types); |
-ModelTypeSet ModelTypeSetFromValue(const base::ListValue& value); |
+SYNC_EXPORT ModelTypeSet ModelTypeSetFromValue(const base::ListValue& value); |
// Returns a string corresponding to the syncable tag for this datatype. |
-std::string ModelTypeToRootTag(ModelType type); |
+SYNC_EXPORT std::string ModelTypeToRootTag(ModelType type); |
// Convert a real model type to a notification type (used for |
// subscribing to server-issued notifications). Returns true iff |
// |model_type| was a real model type and |notification_type| was |
// filled in. |
-bool RealModelTypeToNotificationType(ModelType model_type, |
- std::string* notification_type); |
+SYNC_EXPORT bool RealModelTypeToNotificationType( |
+ ModelType model_type, std::string* notification_type); |
// Converts a notification type to a real model type. Returns true |
// iff |notification_type| was the notification type of a real model |
// type and |model_type| was filled in. |
-bool NotificationTypeToRealModelType(const std::string& notification_type, |
- ModelType* model_type); |
+SYNC_EXPORT bool NotificationTypeToRealModelType( |
+ const std::string& notification_type, |
+ ModelType* model_type); |
// Returns true if |model_type| is a real datatype |
-bool IsRealDataType(ModelType model_type); |
+SYNC_EXPORT bool IsRealDataType(ModelType model_type); |
} // namespace syncer |