diff options
Diffstat (limited to 'src/google/protobuf/any.h')
-rw-r--r-- | src/google/protobuf/any.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/google/protobuf/any.h b/src/google/protobuf/any.h index a34e5f8e..db7d76a8 100644 --- a/src/google/protobuf/any.h +++ b/src/google/protobuf/any.h @@ -38,12 +38,14 @@ #include <google/protobuf/message.h> #include <google/protobuf/arenastring.h> +#include <google/protobuf/port_def.inc> + namespace google { namespace protobuf { namespace internal { // Helper class used to implement google::protobuf::Any. -class LIBPROTOBUF_EXPORT AnyMetadata { +class PROTOBUF_EXPORT AnyMetadata { typedef ArenaStringPtr UrlType; typedef ArenaStringPtr ValueType; public: @@ -59,7 +61,7 @@ class LIBPROTOBUF_EXPORT AnyMetadata { // For example, both PackFrom(message, "type.googleapis.com") and // PackFrom(message, "type.googleapis.com/") yield the same result type // URL: "type.googleapis.com/<message_full_name>". - void PackFrom(const Message& message, const string& type_url_prefix); + void PackFrom(const Message& message, const std::string& type_url_prefix); // Unpacks the payload into the given message. Returns false if the message's // type doesn't match the type specified in the type URL (i.e., the full @@ -95,15 +97,15 @@ extern const char kTypeGoogleProdComPrefix[]; // "type.googleprod.com/". // // NOTE: this function is available publicly as: // google::protobuf::Any() // static method on the generated message type. -bool ParseAnyTypeUrl(const string& type_url, string* full_type_name); +bool ParseAnyTypeUrl(const std::string& type_url, std::string* full_type_name); // Get the proto type name and prefix from Any::type_url value. For example, // passing "type.googleapis.com/rpc.QueryOrigin" will return // "type.googleapis.com/" in *url_prefix and "rpc.QueryOrigin" in // *full_type_name. Returns false if the type_url does not have a "/" in the // type url separating the full type name. -bool ParseAnyTypeUrl(const string& type_url, string* url_prefix, - string* full_type_name); +bool ParseAnyTypeUrl(const std::string& type_url, std::string* url_prefix, + std::string* full_type_name); // See if message is of type google.protobuf.Any, if so, return the descriptors // for "type_url" and "value" fields. @@ -113,6 +115,8 @@ bool GetAnyFieldDescriptors(const Message& message, } // namespace internal } // namespace protobuf - } // namespace google + +#include <google/protobuf/port_undef.inc> + #endif // GOOGLE_PROTOBUF_ANY_H__ |