]> git.saurik.com Git - apple/security.git/blob - keychain/analytics/C2Metric/SECC2MPNetworkEvent.h
Security-59306.11.20.tar.gz
[apple/security.git] / keychain / analytics / C2Metric / SECC2MPNetworkEvent.h
1 // This file was automatically generated by protocompiler
2 // DO NOT EDIT!
3 // Compiled from C2Metric.proto
4
5 #import <Foundation/Foundation.h>
6 #import <ProtocolBuffer/PBCodable.h>
7
8 @class SECC2MPError;
9
10 typedef NS_ENUM(int32_t, SECC2MPNetworkEvent_Trigger) {
11 SECC2MPNetworkEvent_Trigger_none_trigger = 0,
12 SECC2MPNetworkEvent_Trigger_user_default_trigger = 1,
13 SECC2MPNetworkEvent_Trigger_frequency_trigger = 2,
14 SECC2MPNetworkEvent_Trigger_response_header_trigger = 4,
15 };
16 #ifdef __OBJC__
17 NS_INLINE NSString *SECC2MPNetworkEvent_TriggerAsString(SECC2MPNetworkEvent_Trigger value)
18 {
19 switch (value)
20 {
21 case SECC2MPNetworkEvent_Trigger_none_trigger: return @"none_trigger";
22 case SECC2MPNetworkEvent_Trigger_user_default_trigger: return @"user_default_trigger";
23 case SECC2MPNetworkEvent_Trigger_frequency_trigger: return @"frequency_trigger";
24 case SECC2MPNetworkEvent_Trigger_response_header_trigger: return @"response_header_trigger";
25 default: return [NSString stringWithFormat:@"(unknown: %i)", value];
26 }
27 }
28 #endif /* __OBJC__ */
29 #ifdef __OBJC__
30 NS_INLINE SECC2MPNetworkEvent_Trigger StringAsSECC2MPNetworkEvent_Trigger(NSString *value)
31 {
32 if ([value isEqualToString:@"none_trigger"]) return SECC2MPNetworkEvent_Trigger_none_trigger;
33 if ([value isEqualToString:@"user_default_trigger"]) return SECC2MPNetworkEvent_Trigger_user_default_trigger;
34 if ([value isEqualToString:@"frequency_trigger"]) return SECC2MPNetworkEvent_Trigger_frequency_trigger;
35 if ([value isEqualToString:@"response_header_trigger"]) return SECC2MPNetworkEvent_Trigger_response_header_trigger;
36 return SECC2MPNetworkEvent_Trigger_none_trigger;
37 }
38 #endif /* __OBJC__ */
39
40 #ifdef __cplusplus
41 #define SECC2MPNETWORKEVENT_FUNCTION extern "C" __attribute__((visibility("hidden")))
42 #else
43 #define SECC2MPNETWORKEVENT_FUNCTION extern __attribute__((visibility("hidden")))
44 #endif
45
46 __attribute__((visibility("hidden")))
47 @interface SECC2MPNetworkEvent : PBCodable <NSCopying>
48 {
49 uint64_t _networkRequestBodyBytesSent;
50 uint64_t _networkResponseBodyBytesReceived;
51 uint64_t _networkStatusCode;
52 uint64_t _reportFrequency;
53 uint64_t _reportFrequencyBase;
54 uint64_t _timestampC2Init;
55 uint64_t _timestampC2Now;
56 uint64_t _timestampC2Start;
57 uint64_t _timestampDnsEnd;
58 uint64_t _timestampDnsStart;
59 uint64_t _timestampRequestEnd;
60 uint64_t _timestampRequestStart;
61 uint64_t _timestampResponseEnd;
62 uint64_t _timestampResponseStart;
63 uint64_t _timestampSslStart;
64 uint64_t _timestampTcpEnd;
65 uint64_t _timestampTcpStart;
66 uint64_t _triggers;
67 NSString *_networkConnectionUuid;
68 SECC2MPError *_networkFatalError;
69 NSString *_networkHostname;
70 NSString *_networkInterfaceIdentifier;
71 uint32_t _networkPreviousAttemptCount;
72 NSString *_networkProtocolName;
73 NSString *_networkRemoteAddresssAndPort;
74 uint32_t _networkRequestHeaderSize;
75 NSString *_networkRequestUri;
76 uint32_t _networkResponseHeaderSize;
77 NSString *_networkTaskDescription;
78 NSString *_optionsQualityOfService;
79 NSString *_optionsSourceApplicationBundleIdentifier;
80 NSString *_optionsSourceApplicationSecondaryIdentifier;
81 uint32_t _optionsTimeoutIntervalForRequest;
82 uint32_t _optionsTimeoutIntervalForResource;
83 BOOL _networkConnectionReused;
84 BOOL _optionsAllowExpensiveAccess;
85 BOOL _optionsAllowPowerNapScheduling;
86 BOOL _optionsAppleIdContext;
87 BOOL _optionsOutOfProcess;
88 BOOL _optionsOutOfProcessForceDiscretionary;
89 BOOL _optionsTlsPinningRequired;
90 struct {
91 int networkRequestBodyBytesSent:1;
92 int networkResponseBodyBytesReceived:1;
93 int networkStatusCode:1;
94 int reportFrequency:1;
95 int reportFrequencyBase:1;
96 int timestampC2Init:1;
97 int timestampC2Now:1;
98 int timestampC2Start:1;
99 int timestampDnsEnd:1;
100 int timestampDnsStart:1;
101 int timestampRequestEnd:1;
102 int timestampRequestStart:1;
103 int timestampResponseEnd:1;
104 int timestampResponseStart:1;
105 int timestampSslStart:1;
106 int timestampTcpEnd:1;
107 int timestampTcpStart:1;
108 int triggers:1;
109 int networkPreviousAttemptCount:1;
110 int networkRequestHeaderSize:1;
111 int networkResponseHeaderSize:1;
112 int optionsTimeoutIntervalForRequest:1;
113 int optionsTimeoutIntervalForResource:1;
114 int networkConnectionReused:1;
115 int optionsAllowExpensiveAccess:1;
116 int optionsAllowPowerNapScheduling:1;
117 int optionsAppleIdContext:1;
118 int optionsOutOfProcess:1;
119 int optionsOutOfProcessForceDiscretionary:1;
120 int optionsTlsPinningRequired:1;
121 } _has;
122 }
123
124
125 @property (nonatomic) BOOL hasTriggers;
126 /** Deprecated. Use Metric.triggers instead. */
127 @property (nonatomic) uint64_t triggers;
128
129 @property (nonatomic) BOOL hasReportFrequency;
130 /** Deprecated. Use Metric.report_frequency instead. */
131 @property (nonatomic) uint64_t reportFrequency;
132
133 @property (nonatomic) BOOL hasReportFrequencyBase;
134 /** Deprecated. Use Metric.report_frequency_base instead. */
135 @property (nonatomic) uint64_t reportFrequencyBase;
136
137 @property (nonatomic, readonly) BOOL hasNetworkTaskDescription;
138 @property (nonatomic, retain) NSString *networkTaskDescription;
139
140 @property (nonatomic, readonly) BOOL hasNetworkHostname;
141 @property (nonatomic, retain) NSString *networkHostname;
142
143 @property (nonatomic, readonly) BOOL hasNetworkRemoteAddresssAndPort;
144 @property (nonatomic, retain) NSString *networkRemoteAddresssAndPort;
145
146 @property (nonatomic, readonly) BOOL hasNetworkConnectionUuid;
147 @property (nonatomic, retain) NSString *networkConnectionUuid;
148
149 @property (nonatomic) BOOL hasNetworkConnectionReused;
150 @property (nonatomic) BOOL networkConnectionReused;
151
152 @property (nonatomic, readonly) BOOL hasNetworkInterfaceIdentifier;
153 @property (nonatomic, retain) NSString *networkInterfaceIdentifier;
154
155 @property (nonatomic, readonly) BOOL hasNetworkProtocolName;
156 @property (nonatomic, retain) NSString *networkProtocolName;
157
158 @property (nonatomic) BOOL hasNetworkRequestHeaderSize;
159 @property (nonatomic) uint32_t networkRequestHeaderSize;
160
161 @property (nonatomic) BOOL hasNetworkRequestBodyBytesSent;
162 @property (nonatomic) uint64_t networkRequestBodyBytesSent;
163
164 @property (nonatomic) BOOL hasNetworkResponseHeaderSize;
165 @property (nonatomic) uint32_t networkResponseHeaderSize;
166
167 @property (nonatomic) BOOL hasNetworkResponseBodyBytesReceived;
168 @property (nonatomic) uint64_t networkResponseBodyBytesReceived;
169
170 @property (nonatomic) BOOL hasNetworkPreviousAttemptCount;
171 @property (nonatomic) uint32_t networkPreviousAttemptCount;
172
173 @property (nonatomic, readonly) BOOL hasNetworkFatalError;
174 @property (nonatomic, retain) SECC2MPError *networkFatalError;
175
176 @property (nonatomic) BOOL hasNetworkStatusCode;
177 @property (nonatomic) uint64_t networkStatusCode;
178
179 @property (nonatomic, readonly) BOOL hasNetworkRequestUri;
180 @property (nonatomic, retain) NSString *networkRequestUri;
181
182 @property (nonatomic) BOOL hasTimestampC2Init;
183 @property (nonatomic) uint64_t timestampC2Init;
184
185 @property (nonatomic) BOOL hasTimestampC2Start;
186 @property (nonatomic) uint64_t timestampC2Start;
187
188 @property (nonatomic) BOOL hasTimestampC2Now;
189 @property (nonatomic) uint64_t timestampC2Now;
190
191 @property (nonatomic) BOOL hasTimestampDnsStart;
192 @property (nonatomic) uint64_t timestampDnsStart;
193
194 @property (nonatomic) BOOL hasTimestampDnsEnd;
195 @property (nonatomic) uint64_t timestampDnsEnd;
196
197 @property (nonatomic) BOOL hasTimestampTcpStart;
198 @property (nonatomic) uint64_t timestampTcpStart;
199
200 @property (nonatomic) BOOL hasTimestampTcpEnd;
201 @property (nonatomic) uint64_t timestampTcpEnd;
202
203 @property (nonatomic) BOOL hasTimestampSslStart;
204 @property (nonatomic) uint64_t timestampSslStart;
205
206 @property (nonatomic) BOOL hasTimestampRequestStart;
207 @property (nonatomic) uint64_t timestampRequestStart;
208
209 @property (nonatomic) BOOL hasTimestampRequestEnd;
210 @property (nonatomic) uint64_t timestampRequestEnd;
211
212 @property (nonatomic) BOOL hasTimestampResponseStart;
213 @property (nonatomic) uint64_t timestampResponseStart;
214
215 @property (nonatomic) BOOL hasTimestampResponseEnd;
216 @property (nonatomic) uint64_t timestampResponseEnd;
217
218 @property (nonatomic, readonly) BOOL hasOptionsQualityOfService;
219 @property (nonatomic, retain) NSString *optionsQualityOfService;
220
221 @property (nonatomic) BOOL hasOptionsOutOfProcess;
222 @property (nonatomic) BOOL optionsOutOfProcess;
223
224 @property (nonatomic) BOOL hasOptionsOutOfProcessForceDiscretionary;
225 @property (nonatomic) BOOL optionsOutOfProcessForceDiscretionary;
226
227 @property (nonatomic) BOOL hasOptionsAllowExpensiveAccess;
228 @property (nonatomic) BOOL optionsAllowExpensiveAccess;
229
230 @property (nonatomic) BOOL hasOptionsAllowPowerNapScheduling;
231 @property (nonatomic) BOOL optionsAllowPowerNapScheduling;
232
233 @property (nonatomic) BOOL hasOptionsTimeoutIntervalForRequest;
234 @property (nonatomic) uint32_t optionsTimeoutIntervalForRequest;
235
236 @property (nonatomic) BOOL hasOptionsTimeoutIntervalForResource;
237 @property (nonatomic) uint32_t optionsTimeoutIntervalForResource;
238
239 @property (nonatomic, readonly) BOOL hasOptionsSourceApplicationBundleIdentifier;
240 @property (nonatomic, retain) NSString *optionsSourceApplicationBundleIdentifier;
241
242 @property (nonatomic, readonly) BOOL hasOptionsSourceApplicationSecondaryIdentifier;
243 @property (nonatomic, retain) NSString *optionsSourceApplicationSecondaryIdentifier;
244
245 @property (nonatomic) BOOL hasOptionsAppleIdContext;
246 @property (nonatomic) BOOL optionsAppleIdContext;
247
248 @property (nonatomic) BOOL hasOptionsTlsPinningRequired;
249 @property (nonatomic) BOOL optionsTlsPinningRequired;
250
251 // Performs a shallow copy into other
252 - (void)copyTo:(SECC2MPNetworkEvent *)other;
253
254 // Performs a deep merge from other into self
255 // If set in other, singular values in self are replaced in self
256 // Singular composite values are recursively merged
257 // Repeated values from other are appended to repeated values in self
258 - (void)mergeFrom:(SECC2MPNetworkEvent *)other;
259
260 SECC2MPNETWORKEVENT_FUNCTION BOOL SECC2MPNetworkEventReadFrom(__unsafe_unretained SECC2MPNetworkEvent *self, __unsafe_unretained PBDataReader *reader);
261
262 @end
263