Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Side by Side Diff: third_party/protobuf/objectivec/google/protobuf/Timestamp.pbobjc.h

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Generated by the protocol buffer compiler. DO NOT EDIT! 1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/timestamp.proto 2 // source: google/protobuf/timestamp.proto
3 3
4 #import "GPBProtocolBuffers.h" 4 // This CPP symbol can be defined to use imports that match up to the framework
5 // imports needed when using CocoaPods.
6 #if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
7 #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
8 #endif
5 9
6 #if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30001 10 #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
7 #error This file was generated by a different version of protoc which is incompa tible with your Protocol Buffer library sources. 11 #import <Protobuf/GPBProtocolBuffers.h>
12 #else
13 #import "GPBProtocolBuffers.h"
14 #endif
15
16 #if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
17 #error This file was generated by a newer version of protoc which is incompatibl e with your Protocol Buffer library sources.
18 #endif
19 #if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
20 #error This file was generated by an older version of protoc which is incompatib le with your Protocol Buffer library sources.
8 #endif 21 #endif
9 22
10 // @@protoc_insertion_point(imports) 23 // @@protoc_insertion_point(imports)
11 24
12 #pragma clang diagnostic push 25 #pragma clang diagnostic push
13 #pragma clang diagnostic ignored "-Wdeprecated-declarations" 26 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
14 27
15 CF_EXTERN_C_BEGIN 28 CF_EXTERN_C_BEGIN
16 29
17 NS_ASSUME_NONNULL_BEGIN 30 NS_ASSUME_NONNULL_BEGIN
18 31
19 #pragma mark - GPBTimestampRoot 32 #pragma mark - GPBTimestampRoot
20 33
21 /// Exposes the extension registry for this file. 34 /**
22 /// 35 * Exposes the extension registry for this file.
23 /// The base class provides: 36 *
24 /// @code 37 * The base class provides:
25 /// + (GPBExtensionRegistry *)extensionRegistry; 38 * @code
26 /// @endcode 39 * + (GPBExtensionRegistry *)extensionRegistry;
27 /// which is a @c GPBExtensionRegistry that includes all the extensions defined by 40 * @endcode
28 /// this file and all files that it depends on. 41 * which is a @c GPBExtensionRegistry that includes all the extensions defined b y
42 * this file and all files that it depends on.
43 **/
29 @interface GPBTimestampRoot : GPBRootObject 44 @interface GPBTimestampRoot : GPBRootObject
30 @end 45 @end
31 46
32 #pragma mark - GPBTimestamp 47 #pragma mark - GPBTimestamp
33 48
34 typedef GPB_ENUM(GPBTimestamp_FieldNumber) { 49 typedef GPB_ENUM(GPBTimestamp_FieldNumber) {
35 GPBTimestamp_FieldNumber_Seconds = 1, 50 GPBTimestamp_FieldNumber_Seconds = 1,
36 GPBTimestamp_FieldNumber_Nanos = 2, 51 GPBTimestamp_FieldNumber_Nanos = 2,
37 }; 52 };
38 53
39 /// A Timestamp represents a point in time independent of any time zone 54 /**
40 /// or calendar, represented as seconds and fractions of seconds at 55 * A Timestamp represents a point in time independent of any time zone
41 /// nanosecond resolution in UTC Epoch time. It is encoded using the 56 * or calendar, represented as seconds and fractions of seconds at
42 /// Proleptic Gregorian Calendar which extends the Gregorian calendar 57 * nanosecond resolution in UTC Epoch time. It is encoded using the
43 /// backwards to year one. It is encoded assuming all minutes are 60 58 * Proleptic Gregorian Calendar which extends the Gregorian calendar
44 /// seconds long, i.e. leap seconds are "smeared" so that no leap second 59 * backwards to year one. It is encoded assuming all minutes are 60
45 /// table is needed for interpretation. Range is from 60 * seconds long, i.e. leap seconds are "smeared" so that no leap second
46 /// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. 61 * table is needed for interpretation. Range is from
47 /// By restricting to that range, we ensure that we can convert to 62 * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
48 /// and from RFC 3339 date strings. 63 * By restricting to that range, we ensure that we can convert to
49 /// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339. txt). 64 * and from RFC 3339 date strings.
50 /// 65 * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.t xt).
51 /// Example 1: Compute Timestamp from POSIX `time()`. 66 *
52 /// 67 * Example 1: Compute Timestamp from POSIX `time()`.
53 /// Timestamp timestamp; 68 *
54 /// timestamp.set_seconds(time(NULL)); 69 * Timestamp timestamp;
55 /// timestamp.set_nanos(0); 70 * timestamp.set_seconds(time(NULL));
56 /// 71 * timestamp.set_nanos(0);
57 /// Example 2: Compute Timestamp from POSIX `gettimeofday()`. 72 *
58 /// 73 * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
59 /// struct timeval tv; 74 *
60 /// gettimeofday(&tv, NULL); 75 * struct timeval tv;
61 /// 76 * gettimeofday(&tv, NULL);
62 /// Timestamp timestamp; 77 *
63 /// timestamp.set_seconds(tv.tv_sec); 78 * Timestamp timestamp;
64 /// timestamp.set_nanos(tv.tv_usec * 1000); 79 * timestamp.set_seconds(tv.tv_sec);
65 /// 80 * timestamp.set_nanos(tv.tv_usec * 1000);
66 /// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 81 *
67 /// 82 * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
68 /// FILETIME ft; 83 *
69 /// GetSystemTimeAsFileTime(&ft); 84 * FILETIME ft;
70 /// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 85 * GetSystemTimeAsFileTime(&ft);
71 /// 86 * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
72 /// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z 87 *
73 /// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. 88 * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
74 /// Timestamp timestamp; 89 * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
75 /// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); 90 * Timestamp timestamp;
76 /// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 91 * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
77 /// 92 * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
78 /// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 93 *
79 /// 94 * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
80 /// long millis = System.currentTimeMillis(); 95 *
81 /// 96 * long millis = System.currentTimeMillis();
82 /// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) 97 *
83 /// .setNanos((int) ((millis % 1000) * 1000000)).build(); 98 * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
84 /// 99 * .setNanos((int) ((millis % 1000) * 1000000)).build();
85 /// 100 *
86 /// Example 5: Compute Timestamp from current time in Python. 101 *
87 /// 102 * Example 5: Compute Timestamp from current time in Python.
88 /// now = time.time() 103 *
89 /// seconds = int(now) 104 * timestamp = Timestamp()
90 /// nanos = int((now - seconds) * 10**9) 105 * timestamp.GetCurrentTime()
91 /// timestamp = Timestamp(seconds=seconds, nanos=nanos) 106 **/
92 @interface GPBTimestamp : GPBMessage 107 @interface GPBTimestamp : GPBMessage
93 108
94 /// Represents seconds of UTC time since Unix epoch 109 /**
95 /// 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to 110 * Represents seconds of UTC time since Unix epoch
96 /// 9999-12-31T23:59:59Z inclusive. 111 * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
112 * 9999-12-31T23:59:59Z inclusive.
113 **/
97 @property(nonatomic, readwrite) int64_t seconds; 114 @property(nonatomic, readwrite) int64_t seconds;
98 115
99 /// Non-negative fractions of a second at nanosecond resolution. Negative 116 /**
100 /// second values with fractions must still have non-negative nanos values 117 * Non-negative fractions of a second at nanosecond resolution. Negative
101 /// that count forward in time. Must be from 0 to 999,999,999 118 * second values with fractions must still have non-negative nanos values
102 /// inclusive. 119 * that count forward in time. Must be from 0 to 999,999,999
120 * inclusive.
121 **/
103 @property(nonatomic, readwrite) int32_t nanos; 122 @property(nonatomic, readwrite) int32_t nanos;
104 123
105 @end 124 @end
106 125
107 NS_ASSUME_NONNULL_END 126 NS_ASSUME_NONNULL_END
108 127
109 CF_EXTERN_C_END 128 CF_EXTERN_C_END
110 129
111 #pragma clang diagnostic pop 130 #pragma clang diagnostic pop
112 131
113 // @@protoc_insertion_point(global_scope) 132 // @@protoc_insertion_point(global_scope)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698