diff options
author | stone4774 <25053818+stone4774@users.noreply.github.com> | 2018-03-22 11:16:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-22 11:16:34 +0800 |
commit | c99f5278eb8dad6f42def88ce8b5a3453f6df4a8 (patch) | |
tree | c3cd284ec9d2981f61da266d040935b73275b5c4 /src/google/protobuf/any.h | |
parent | d053271deebe0efcd41729991b1f3d618b638ad5 (diff) | |
parent | ed4321d1cb33199984118d801956822842771e7e (diff) | |
download | protobuf-c99f5278eb8dad6f42def88ce8b5a3453f6df4a8.tar.gz protobuf-c99f5278eb8dad6f42def88ce8b5a3453f6df4a8.tar.bz2 protobuf-c99f5278eb8dad6f42def88ce8b5a3453f6df4a8.zip |
Merge branch 'master' into fixbug_enum2json2
Diffstat (limited to 'src/google/protobuf/any.h')
-rw-r--r-- | src/google/protobuf/any.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/google/protobuf/any.h b/src/google/protobuf/any.h index c2c27ec3..a34e5f8e 100644 --- a/src/google/protobuf/any.h +++ b/src/google/protobuf/any.h @@ -92,8 +92,19 @@ extern const char kTypeGoogleProdComPrefix[]; // "type.googleprod.com/". // "type.googleapis.com/rpc.QueryOrigin" will return "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. +// +// 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); +// 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); + // See if message is of type google.protobuf.Any, if so, return the descriptors // for "type_url" and "value" fields. bool GetAnyFieldDescriptors(const Message& message, |