PageRenderTime 56ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 0ms

/include/Platform/Universal Windows/UWP/WindowsFoundationDiagnostics.h

https://gitlab.com/goolic/WinObjC
C Header | 537 lines | 426 code | 68 blank | 43 comment | 0 complexity | fab35d94fb2ad5a189080fec6992bd64 MD5 | raw file
  1. //******************************************************************************
  2. //
  3. // Copyright (c) 2015 Microsoft Corporation. All rights reserved.
  4. //
  5. // This code is licensed under the MIT License (MIT).
  6. //
  7. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  8. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  9. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  10. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  11. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  12. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  13. // THE SOFTWARE.
  14. //
  15. //******************************************************************************
  16. // WindowsFoundationDiagnostics.h
  17. // Generated from winmd2objc
  18. #pragma once
  19. #include "interopBase.h"
  20. @class WFDTracingStatusChangedEventArgs, WFDAsyncCausalityTracer, WFDRuntimeBrokerErrorSettings, WFDErrorDetails, WFDLoggingOptions, WFDLoggingChannelOptions, WFDLoggingFields, WFDLoggingActivity, WFDLoggingChannel, WFDLoggingSession, WFDLogFileGeneratedEventArgs, WFDFileLoggingSession;
  21. @protocol WFDITracingStatusChangedEventArgs, WFDIAsyncCausalityTracerStatics, WFDIErrorReportingSettings, WFDIErrorDetailsStatics, WFDIErrorDetails, WFDILoggingOptions, WFDILoggingOptionsFactory, WFDILoggingChannelOptions, WFDILoggingChannelOptionsFactory, WFDILoggingFields, WFDILoggingTarget, WFDILoggingChannel, WFDILoggingChannel2, WFDILoggingChannelFactory, WFDILoggingChannelFactory2, WFDILoggingActivity, WFDILoggingActivity2, WFDILoggingActivityFactory, WFDILoggingSession, WFDILoggingSessionFactory, WFDILogFileGeneratedEventArgs, WFDIFileLoggingSession, WFDIFileLoggingSessionFactory;
  22. // Windows.Foundation.Diagnostics.CausalityTraceLevel
  23. enum _WFDCausalityTraceLevel {
  24. WFDCausalityTraceLevelRequired = 0,
  25. WFDCausalityTraceLevelImportant = 1,
  26. WFDCausalityTraceLevelVerbose = 2,
  27. };
  28. typedef unsigned WFDCausalityTraceLevel;
  29. // Windows.Foundation.Diagnostics.CausalitySource
  30. enum _WFDCausalitySource {
  31. WFDCausalitySourceApplication = 0,
  32. WFDCausalitySourceLibrary = 1,
  33. WFDCausalitySourceSystem = 2,
  34. };
  35. typedef unsigned WFDCausalitySource;
  36. // Windows.Foundation.Diagnostics.CausalityRelation
  37. enum _WFDCausalityRelation {
  38. WFDCausalityRelationAssignDelegate = 0,
  39. WFDCausalityRelationJoin = 1,
  40. WFDCausalityRelationChoice = 2,
  41. WFDCausalityRelationCancel = 3,
  42. WFDCausalityRelationError = 4,
  43. };
  44. typedef unsigned WFDCausalityRelation;
  45. // Windows.Foundation.Diagnostics.CausalitySynchronousWork
  46. enum _WFDCausalitySynchronousWork {
  47. WFDCausalitySynchronousWorkCompletionNotification = 0,
  48. WFDCausalitySynchronousWorkProgressNotification = 1,
  49. WFDCausalitySynchronousWorkExecution = 2,
  50. };
  51. typedef unsigned WFDCausalitySynchronousWork;
  52. // Windows.Foundation.Diagnostics.ErrorOptions
  53. enum _WFDErrorOptions {
  54. WFDErrorOptionsNone = 0,
  55. WFDErrorOptionsSuppressExceptions = 1,
  56. WFDErrorOptionsForceExceptions = 2,
  57. WFDErrorOptionsUseSetErrorInfo = 4,
  58. WFDErrorOptionsSuppressSetErrorInfo = 8,
  59. };
  60. typedef unsigned WFDErrorOptions;
  61. // Windows.Foundation.Diagnostics.LoggingLevel
  62. enum _WFDLoggingLevel {
  63. WFDLoggingLevelVerbose = 0,
  64. WFDLoggingLevelInformation = 1,
  65. WFDLoggingLevelWarning = 2,
  66. WFDLoggingLevelError = 3,
  67. WFDLoggingLevelCritical = 4,
  68. };
  69. typedef unsigned WFDLoggingLevel;
  70. // Windows.Foundation.Diagnostics.LoggingOpcode
  71. enum _WFDLoggingOpcode {
  72. WFDLoggingOpcodeInfo = 0,
  73. WFDLoggingOpcodeStart = 1,
  74. WFDLoggingOpcodeStop = 2,
  75. WFDLoggingOpcodeReply = 6,
  76. WFDLoggingOpcodeResume = 7,
  77. WFDLoggingOpcodeSuspend = 8,
  78. WFDLoggingOpcodeSend = 9,
  79. };
  80. typedef unsigned WFDLoggingOpcode;
  81. // Windows.Foundation.Diagnostics.LoggingFieldFormat
  82. enum _WFDLoggingFieldFormat {
  83. WFDLoggingFieldFormatDefault = 0,
  84. WFDLoggingFieldFormatHidden = 1,
  85. WFDLoggingFieldFormatString = 2,
  86. WFDLoggingFieldFormatBoolean = 3,
  87. WFDLoggingFieldFormatHexadecimal = 4,
  88. WFDLoggingFieldFormatProcessId = 5,
  89. WFDLoggingFieldFormatThreadId = 6,
  90. WFDLoggingFieldFormatPort = 7,
  91. WFDLoggingFieldFormatIpv4Address = 8,
  92. WFDLoggingFieldFormatIpv6Address = 9,
  93. WFDLoggingFieldFormatSocketAddress = 10,
  94. WFDLoggingFieldFormatXml = 11,
  95. WFDLoggingFieldFormatJson = 12,
  96. WFDLoggingFieldFormatWin32Error = 13,
  97. WFDLoggingFieldFormatNTStatus = 14,
  98. WFDLoggingFieldFormatHResult = 15,
  99. WFDLoggingFieldFormatFileTime = 16,
  100. WFDLoggingFieldFormatSigned = 17,
  101. WFDLoggingFieldFormatUnsigned = 18,
  102. };
  103. typedef unsigned WFDLoggingFieldFormat;
  104. #include "WindowsStorage.h"
  105. #include "WindowsFoundation.h"
  106. #import <Foundation/Foundation.h>
  107. // Windows.Foundation.Diagnostics.IErrorReportingSettings
  108. #ifndef __WFDIErrorReportingSettings_DEFINED__
  109. #define __WFDIErrorReportingSettings_DEFINED__
  110. @protocol WFDIErrorReportingSettings
  111. - (void)setErrorOptions:(WFDErrorOptions)value;
  112. - (WFDErrorOptions)getErrorOptions;
  113. @end
  114. #endif // __WFDIErrorReportingSettings_DEFINED__
  115. // Windows.Foundation.Diagnostics.ILoggingTarget
  116. #ifndef __WFDILoggingTarget_DEFINED__
  117. #define __WFDILoggingTarget_DEFINED__
  118. @protocol WFDILoggingTarget
  119. - (BOOL)isEnabled;
  120. - (BOOL)isEnabledWithLevel:(WFDLoggingLevel)level;
  121. - (BOOL)isEnabledWithLevelAndKeywords:(WFDLoggingLevel)level keywords:(int64_t)keywords;
  122. - (void)logEvent:(NSString *)eventName;
  123. - (void)logEventWithFields:(NSString *)eventName fields:(WFDLoggingFields*)fields;
  124. - (void)logEventWithFieldsAndLevel:(NSString *)eventName fields:(WFDLoggingFields*)fields level:(WFDLoggingLevel)level;
  125. - (void)logEventWithFieldsAndOptions:(NSString *)eventName fields:(WFDLoggingFields*)fields level:(WFDLoggingLevel)level options:(WFDLoggingOptions*)options;
  126. - (WFDLoggingActivity*)startActivity:(NSString *)startEventName;
  127. - (WFDLoggingActivity*)startActivityWithFields:(NSString *)startEventName fields:(WFDLoggingFields*)fields;
  128. - (WFDLoggingActivity*)startActivityWithFieldsAndLevel:(NSString *)startEventName fields:(WFDLoggingFields*)fields level:(WFDLoggingLevel)level;
  129. - (WFDLoggingActivity*)startActivityWithFieldsAndOptions:(NSString *)startEventName fields:(WFDLoggingFields*)fields level:(WFDLoggingLevel)level options:(WFDLoggingOptions*)options;
  130. @end
  131. #endif // __WFDILoggingTarget_DEFINED__
  132. // Windows.Foundation.IClosable
  133. #ifndef __WFIClosable_DEFINED__
  134. #define __WFIClosable_DEFINED__
  135. @protocol WFIClosable
  136. - (void)close;
  137. @end
  138. #endif // __WFIClosable_DEFINED__
  139. // Windows.Foundation.Diagnostics.ILoggingChannel
  140. #ifndef __WFDILoggingChannel_DEFINED__
  141. #define __WFDILoggingChannel_DEFINED__
  142. @protocol WFDILoggingChannel <WFIClosable>
  143. @property (readonly) BOOL enabled;
  144. @property (readonly) WFDLoggingLevel level;
  145. @property (readonly) NSString * name;
  146. - (EventRegistrationToken)addLoggingEnabledEvent:(void(^)(RTObject<WFDILoggingChannel>*, RTObject*))del;
  147. - (void)removeLoggingEnabledEvent:(EventRegistrationToken)tok;
  148. - (void)logMessage:(NSString *)eventString;
  149. - (void)logMessageWithLevel:(NSString *)eventString level:(WFDLoggingLevel)level;
  150. - (void)logValuePair:(NSString *)value1 value2:(int)value2;
  151. - (void)logValuePairWithLevel:(NSString *)value1 value2:(int)value2 level:(WFDLoggingLevel)level;
  152. - (void)close;
  153. @end
  154. #endif // __WFDILoggingChannel_DEFINED__
  155. // Windows.Foundation.Diagnostics.ILoggingSession
  156. #ifndef __WFDILoggingSession_DEFINED__
  157. #define __WFDILoggingSession_DEFINED__
  158. @protocol WFDILoggingSession <WFIClosable>
  159. @property (readonly) NSString * name;
  160. - (void)saveToFileAsync:(RTObject<WSIStorageFolder>*)folder fileName:(NSString *)fileName success:(void (^)(WSStorageFile*))success failure:(void (^)(NSError*))failure;
  161. - (void)addLoggingChannel:(RTObject<WFDILoggingChannel>*)loggingChannel;
  162. - (void)addLoggingChannelWithLevel:(RTObject<WFDILoggingChannel>*)loggingChannel maxLevel:(WFDLoggingLevel)maxLevel;
  163. - (void)removeLoggingChannel:(RTObject<WFDILoggingChannel>*)loggingChannel;
  164. - (void)close;
  165. @end
  166. #endif // __WFDILoggingSession_DEFINED__
  167. // Windows.Foundation.Diagnostics.IFileLoggingSession
  168. #ifndef __WFDIFileLoggingSession_DEFINED__
  169. #define __WFDIFileLoggingSession_DEFINED__
  170. @protocol WFDIFileLoggingSession <WFIClosable>
  171. @property (readonly) NSString * name;
  172. - (EventRegistrationToken)addLogFileGeneratedEvent:(void(^)(RTObject<WFDIFileLoggingSession>*, WFDLogFileGeneratedEventArgs*))del;
  173. - (void)removeLogFileGeneratedEvent:(EventRegistrationToken)tok;
  174. - (void)addLoggingChannel:(RTObject<WFDILoggingChannel>*)loggingChannel;
  175. - (void)addLoggingChannelWithLevel:(RTObject<WFDILoggingChannel>*)loggingChannel maxLevel:(WFDLoggingLevel)maxLevel;
  176. - (void)removeLoggingChannel:(RTObject<WFDILoggingChannel>*)loggingChannel;
  177. - (void)closeAndSaveToFileAsyncWithSuccess:(void (^)(WSStorageFile*))success failure:(void (^)(NSError*))failure;
  178. - (void)close;
  179. @end
  180. #endif // __WFDIFileLoggingSession_DEFINED__
  181. // Windows.Foundation.Diagnostics.TracingStatusChangedEventArgs
  182. #ifndef __WFDTracingStatusChangedEventArgs_DEFINED__
  183. #define __WFDTracingStatusChangedEventArgs_DEFINED__
  184. WINRT_EXPORT
  185. @interface WFDTracingStatusChangedEventArgs : RTObject
  186. @property (readonly) BOOL enabled;
  187. @property (readonly) WFDCausalityTraceLevel traceLevel;
  188. @end
  189. #endif // __WFDTracingStatusChangedEventArgs_DEFINED__
  190. // Windows.Foundation.Diagnostics.AsyncCausalityTracer
  191. #ifndef __WFDAsyncCausalityTracer_DEFINED__
  192. #define __WFDAsyncCausalityTracer_DEFINED__
  193. WINRT_EXPORT
  194. @interface WFDAsyncCausalityTracer : RTObject
  195. + (void)traceOperationCreation:(WFDCausalityTraceLevel)traceLevel source:(WFDCausalitySource)source platformId:(WFGUID*)platformId operationId:(uint64_t)operationId operationName:(NSString *)operationName relatedContext:(uint64_t)relatedContext;
  196. + (void)traceOperationCompletion:(WFDCausalityTraceLevel)traceLevel source:(WFDCausalitySource)source platformId:(WFGUID*)platformId operationId:(uint64_t)operationId status:(WFAsyncStatus)status;
  197. + (void)traceOperationRelation:(WFDCausalityTraceLevel)traceLevel source:(WFDCausalitySource)source platformId:(WFGUID*)platformId operationId:(uint64_t)operationId relation:(WFDCausalityRelation)relation;
  198. + (void)traceSynchronousWorkStart:(WFDCausalityTraceLevel)traceLevel source:(WFDCausalitySource)source platformId:(WFGUID*)platformId operationId:(uint64_t)operationId work:(WFDCausalitySynchronousWork)work;
  199. + (void)traceSynchronousWorkCompletion:(WFDCausalityTraceLevel)traceLevel source:(WFDCausalitySource)source work:(WFDCausalitySynchronousWork)work;
  200. + (EventRegistrationToken)addTracingStatusChangedEvent:(void(^)(RTObject*, WFDTracingStatusChangedEventArgs*))del;
  201. + (void)removeTracingStatusChangedEvent:(EventRegistrationToken)tok;
  202. @end
  203. #endif // __WFDAsyncCausalityTracer_DEFINED__
  204. // Windows.Foundation.Diagnostics.RuntimeBrokerErrorSettings
  205. #ifndef __WFDRuntimeBrokerErrorSettings_DEFINED__
  206. #define __WFDRuntimeBrokerErrorSettings_DEFINED__
  207. WINRT_EXPORT
  208. @interface WFDRuntimeBrokerErrorSettings : RTObject <WFDIErrorReportingSettings>
  209. + (instancetype)create ACTIVATOR;
  210. - (void)setErrorOptions:(WFDErrorOptions)value;
  211. - (WFDErrorOptions)getErrorOptions;
  212. @end
  213. #endif // __WFDRuntimeBrokerErrorSettings_DEFINED__
  214. // Windows.Foundation.Diagnostics.ErrorDetails
  215. #ifndef __WFDErrorDetails_DEFINED__
  216. #define __WFDErrorDetails_DEFINED__
  217. WINRT_EXPORT
  218. @interface WFDErrorDetails : RTObject
  219. + (void)createFromHResultAsync:(int)errorCode success:(void (^)(WFDErrorDetails*))success failure:(void (^)(NSError*))failure;
  220. @property (readonly) NSString * description;
  221. @property (readonly) WFUri* helpUri;
  222. @property (readonly) NSString * longDescription;
  223. @end
  224. #endif // __WFDErrorDetails_DEFINED__
  225. // Windows.Foundation.Diagnostics.LoggingOptions
  226. #ifndef __WFDLoggingOptions_DEFINED__
  227. #define __WFDLoggingOptions_DEFINED__
  228. WINRT_EXPORT
  229. @interface WFDLoggingOptions : RTObject
  230. + (instancetype)create ACTIVATOR;
  231. + (WFDLoggingOptions*)createWithKeywords:(int64_t)keywords ACTIVATOR;
  232. @property int16_t task;
  233. @property int tags;
  234. @property WFGUID* relatedActivityId;
  235. @property WFDLoggingOpcode opcode;
  236. @property int64_t keywords;
  237. @property WFGUID* activityId;
  238. @end
  239. #endif // __WFDLoggingOptions_DEFINED__
  240. // Windows.Foundation.Diagnostics.LoggingChannelOptions
  241. #ifndef __WFDLoggingChannelOptions_DEFINED__
  242. #define __WFDLoggingChannelOptions_DEFINED__
  243. WINRT_EXPORT
  244. @interface WFDLoggingChannelOptions : RTObject
  245. + (WFDLoggingChannelOptions*)create:(WFGUID*)group ACTIVATOR;
  246. + (instancetype)create ACTIVATOR;
  247. @property WFGUID* group;
  248. @end
  249. #endif // __WFDLoggingChannelOptions_DEFINED__
  250. // Windows.Foundation.Diagnostics.LoggingFields
  251. #ifndef __WFDLoggingFields_DEFINED__
  252. #define __WFDLoggingFields_DEFINED__
  253. WINRT_EXPORT
  254. @interface WFDLoggingFields : RTObject
  255. + (instancetype)create ACTIVATOR;
  256. - (void)clear;
  257. - (void)beginStruct:(NSString *)name;
  258. - (void)beginStructWithTags:(NSString *)name tags:(int)tags;
  259. - (void)endStruct;
  260. - (void)addEmpty:(NSString *)name;
  261. - (void)addEmptyWithFormat:(NSString *)name format:(WFDLoggingFieldFormat)format;
  262. - (void)addEmptyWithFormatAndTags:(NSString *)name format:(WFDLoggingFieldFormat)format tags:(int)tags;
  263. - (void)addUInt8:(NSString *)name value:(uint8_t)value;
  264. - (void)addUInt8WithFormat:(NSString *)name value:(uint8_t)value format:(WFDLoggingFieldFormat)format;
  265. - (void)addUInt8WithFormatAndTags:(NSString *)name value:(uint8_t)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  266. - (void)addUInt8Array:(NSString *)name value:(id<NSFastEnumeration> /* uint8_t */)value;
  267. - (void)addUInt8ArrayWithFormat:(NSString *)name value:(id<NSFastEnumeration> /* uint8_t */)value format:(WFDLoggingFieldFormat)format;
  268. - (void)addUInt8ArrayWithFormatAndTags:(NSString *)name value:(id<NSFastEnumeration> /* uint8_t */)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  269. - (void)addInt16:(NSString *)name value:(int16_t)value;
  270. - (void)addInt16WithFormat:(NSString *)name value:(int16_t)value format:(WFDLoggingFieldFormat)format;
  271. - (void)addInt16WithFormatAndTags:(NSString *)name value:(int16_t)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  272. - (void)addInt16Array:(NSString *)name value:(id<NSFastEnumeration> /* int16_t */)value;
  273. - (void)addInt16ArrayWithFormat:(NSString *)name value:(id<NSFastEnumeration> /* int16_t */)value format:(WFDLoggingFieldFormat)format;
  274. - (void)addInt16ArrayWithFormatAndTags:(NSString *)name value:(id<NSFastEnumeration> /* int16_t */)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  275. - (void)addUInt16:(NSString *)name value:(unsigned short)value;
  276. - (void)addUInt16WithFormat:(NSString *)name value:(unsigned short)value format:(WFDLoggingFieldFormat)format;
  277. - (void)addUInt16WithFormatAndTags:(NSString *)name value:(unsigned short)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  278. - (void)addUInt16Array:(NSString *)name value:(id<NSFastEnumeration> /* unsigned short */)value;
  279. - (void)addUInt16ArrayWithFormat:(NSString *)name value:(id<NSFastEnumeration> /* unsigned short */)value format:(WFDLoggingFieldFormat)format;
  280. - (void)addUInt16ArrayWithFormatAndTags:(NSString *)name value:(id<NSFastEnumeration> /* unsigned short */)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  281. - (void)addInt32:(NSString *)name value:(int)value;
  282. - (void)addInt32WithFormat:(NSString *)name value:(int)value format:(WFDLoggingFieldFormat)format;
  283. - (void)addInt32WithFormatAndTags:(NSString *)name value:(int)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  284. - (void)addInt32Array:(NSString *)name value:(id<NSFastEnumeration> /* int */)value;
  285. - (void)addInt32ArrayWithFormat:(NSString *)name value:(id<NSFastEnumeration> /* int */)value format:(WFDLoggingFieldFormat)format;
  286. - (void)addInt32ArrayWithFormatAndTags:(NSString *)name value:(id<NSFastEnumeration> /* int */)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  287. - (void)addUInt32:(NSString *)name value:(unsigned int)value;
  288. - (void)addUInt32WithFormat:(NSString *)name value:(unsigned int)value format:(WFDLoggingFieldFormat)format;
  289. - (void)addUInt32WithFormatAndTags:(NSString *)name value:(unsigned int)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  290. - (void)addUInt32Array:(NSString *)name value:(id<NSFastEnumeration> /* unsigned int */)value;
  291. - (void)addUInt32ArrayWithFormat:(NSString *)name value:(id<NSFastEnumeration> /* unsigned int */)value format:(WFDLoggingFieldFormat)format;
  292. - (void)addUInt32ArrayWithFormatAndTags:(NSString *)name value:(id<NSFastEnumeration> /* unsigned int */)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  293. - (void)addInt64:(NSString *)name value:(int64_t)value;
  294. - (void)addInt64WithFormat:(NSString *)name value:(int64_t)value format:(WFDLoggingFieldFormat)format;
  295. - (void)addInt64WithFormatAndTags:(NSString *)name value:(int64_t)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  296. - (void)addInt64Array:(NSString *)name value:(id<NSFastEnumeration> /* int64_t */)value;
  297. - (void)addInt64ArrayWithFormat:(NSString *)name value:(id<NSFastEnumeration> /* int64_t */)value format:(WFDLoggingFieldFormat)format;
  298. - (void)addInt64ArrayWithFormatAndTags:(NSString *)name value:(id<NSFastEnumeration> /* int64_t */)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  299. - (void)addUInt64:(NSString *)name value:(uint64_t)value;
  300. - (void)addUInt64WithFormat:(NSString *)name value:(uint64_t)value format:(WFDLoggingFieldFormat)format;
  301. - (void)addUInt64WithFormatAndTags:(NSString *)name value:(uint64_t)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  302. - (void)addUInt64Array:(NSString *)name value:(id<NSFastEnumeration> /* uint64_t */)value;
  303. - (void)addUInt64ArrayWithFormat:(NSString *)name value:(id<NSFastEnumeration> /* uint64_t */)value format:(WFDLoggingFieldFormat)format;
  304. - (void)addUInt64ArrayWithFormatAndTags:(NSString *)name value:(id<NSFastEnumeration> /* uint64_t */)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  305. - (void)addSingle:(NSString *)name value:(float)value;
  306. - (void)addSingleWithFormat:(NSString *)name value:(float)value format:(WFDLoggingFieldFormat)format;
  307. - (void)addSingleWithFormatAndTags:(NSString *)name value:(float)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  308. - (void)addSingleArray:(NSString *)name value:(id<NSFastEnumeration> /* float */)value;
  309. - (void)addSingleArrayWithFormat:(NSString *)name value:(id<NSFastEnumeration> /* float */)value format:(WFDLoggingFieldFormat)format;
  310. - (void)addSingleArrayWithFormatAndTags:(NSString *)name value:(id<NSFastEnumeration> /* float */)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  311. - (void)addDouble:(NSString *)name value:(double)value;
  312. - (void)addDoubleWithFormat:(NSString *)name value:(double)value format:(WFDLoggingFieldFormat)format;
  313. - (void)addDoubleWithFormatAndTags:(NSString *)name value:(double)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  314. - (void)addDoubleArray:(NSString *)name value:(id<NSFastEnumeration> /* double */)value;
  315. - (void)addDoubleArrayWithFormat:(NSString *)name value:(id<NSFastEnumeration> /* double */)value format:(WFDLoggingFieldFormat)format;
  316. - (void)addDoubleArrayWithFormatAndTags:(NSString *)name value:(id<NSFastEnumeration> /* double */)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  317. - (void)addChar16:(NSString *)name value:(WCHAR)value;
  318. - (void)addChar16WithFormat:(NSString *)name value:(WCHAR)value format:(WFDLoggingFieldFormat)format;
  319. - (void)addChar16WithFormatAndTags:(NSString *)name value:(WCHAR)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  320. - (void)addChar16Array:(NSString *)name value:(id<NSFastEnumeration> /* WCHAR */)value;
  321. - (void)addChar16ArrayWithFormat:(NSString *)name value:(id<NSFastEnumeration> /* WCHAR */)value format:(WFDLoggingFieldFormat)format;
  322. - (void)addChar16ArrayWithFormatAndTags:(NSString *)name value:(id<NSFastEnumeration> /* WCHAR */)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  323. - (void)addBoolean:(NSString *)name value:(BOOL)value;
  324. - (void)addBooleanWithFormat:(NSString *)name value:(BOOL)value format:(WFDLoggingFieldFormat)format;
  325. - (void)addBooleanWithFormatAndTags:(NSString *)name value:(BOOL)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  326. - (void)addBooleanArray:(NSString *)name value:(id<NSFastEnumeration> /* BOOL */)value;
  327. - (void)addBooleanArrayWithFormat:(NSString *)name value:(id<NSFastEnumeration> /* BOOL */)value format:(WFDLoggingFieldFormat)format;
  328. - (void)addBooleanArrayWithFormatAndTags:(NSString *)name value:(id<NSFastEnumeration> /* BOOL */)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  329. - (void)addString:(NSString *)name value:(NSString *)value;
  330. - (void)addStringWithFormat:(NSString *)name value:(NSString *)value format:(WFDLoggingFieldFormat)format;
  331. - (void)addStringWithFormatAndTags:(NSString *)name value:(NSString *)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  332. - (void)addStringArray:(NSString *)name value:(id<NSFastEnumeration> /* NSString * */)value;
  333. - (void)addStringArrayWithFormat:(NSString *)name value:(id<NSFastEnumeration> /* NSString * */)value format:(WFDLoggingFieldFormat)format;
  334. - (void)addStringArrayWithFormatAndTags:(NSString *)name value:(id<NSFastEnumeration> /* NSString * */)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  335. - (void)addGuid:(NSString *)name value:(WFGUID*)value;
  336. - (void)addGuidWithFormat:(NSString *)name value:(WFGUID*)value format:(WFDLoggingFieldFormat)format;
  337. - (void)addGuidWithFormatAndTags:(NSString *)name value:(WFGUID*)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  338. - (void)addGuidArray:(NSString *)name value:(id<NSFastEnumeration> /* WFGUID* */)value;
  339. - (void)addGuidArrayWithFormat:(NSString *)name value:(id<NSFastEnumeration> /* WFGUID* */)value format:(WFDLoggingFieldFormat)format;
  340. - (void)addGuidArrayWithFormatAndTags:(NSString *)name value:(id<NSFastEnumeration> /* WFGUID* */)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  341. - (void)addDateTime:(NSString *)name value:(WFDateTime*)value;
  342. - (void)addDateTimeWithFormat:(NSString *)name value:(WFDateTime*)value format:(WFDLoggingFieldFormat)format;
  343. - (void)addDateTimeWithFormatAndTags:(NSString *)name value:(WFDateTime*)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  344. - (void)addDateTimeArray:(NSString *)name value:(id<NSFastEnumeration> /* WFDateTime* */)value;
  345. - (void)addDateTimeArrayWithFormat:(NSString *)name value:(id<NSFastEnumeration> /* WFDateTime* */)value format:(WFDLoggingFieldFormat)format;
  346. - (void)addDateTimeArrayWithFormatAndTags:(NSString *)name value:(id<NSFastEnumeration> /* WFDateTime* */)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  347. - (void)addTimeSpan:(NSString *)name value:(WFTimeSpan*)value;
  348. - (void)addTimeSpanWithFormat:(NSString *)name value:(WFTimeSpan*)value format:(WFDLoggingFieldFormat)format;
  349. - (void)addTimeSpanWithFormatAndTags:(NSString *)name value:(WFTimeSpan*)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  350. - (void)addTimeSpanArray:(NSString *)name value:(id<NSFastEnumeration> /* WFTimeSpan* */)value;
  351. - (void)addTimeSpanArrayWithFormat:(NSString *)name value:(id<NSFastEnumeration> /* WFTimeSpan* */)value format:(WFDLoggingFieldFormat)format;
  352. - (void)addTimeSpanArrayWithFormatAndTags:(NSString *)name value:(id<NSFastEnumeration> /* WFTimeSpan* */)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  353. - (void)addPoint:(NSString *)name value:(WFPoint*)value;
  354. - (void)addPointWithFormat:(NSString *)name value:(WFPoint*)value format:(WFDLoggingFieldFormat)format;
  355. - (void)addPointWithFormatAndTags:(NSString *)name value:(WFPoint*)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  356. - (void)addPointArray:(NSString *)name value:(id<NSFastEnumeration> /* WFPoint* */)value;
  357. - (void)addPointArrayWithFormat:(NSString *)name value:(id<NSFastEnumeration> /* WFPoint* */)value format:(WFDLoggingFieldFormat)format;
  358. - (void)addPointArrayWithFormatAndTags:(NSString *)name value:(id<NSFastEnumeration> /* WFPoint* */)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  359. - (void)addSize:(NSString *)name value:(WFSize*)value;
  360. - (void)addSizeWithFormat:(NSString *)name value:(WFSize*)value format:(WFDLoggingFieldFormat)format;
  361. - (void)addSizeWithFormatAndTags:(NSString *)name value:(WFSize*)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  362. - (void)addSizeArray:(NSString *)name value:(id<NSFastEnumeration> /* WFSize* */)value;
  363. - (void)addSizeArrayWithFormat:(NSString *)name value:(id<NSFastEnumeration> /* WFSize* */)value format:(WFDLoggingFieldFormat)format;
  364. - (void)addSizeArrayWithFormatAndTags:(NSString *)name value:(id<NSFastEnumeration> /* WFSize* */)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  365. - (void)addRect:(NSString *)name value:(WFRect*)value;
  366. - (void)addRectWithFormat:(NSString *)name value:(WFRect*)value format:(WFDLoggingFieldFormat)format;
  367. - (void)addRectWithFormatAndTags:(NSString *)name value:(WFRect*)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  368. - (void)addRectArray:(NSString *)name value:(id<NSFastEnumeration> /* WFRect* */)value;
  369. - (void)addRectArrayWithFormat:(NSString *)name value:(id<NSFastEnumeration> /* WFRect* */)value format:(WFDLoggingFieldFormat)format;
  370. - (void)addRectArrayWithFormatAndTags:(NSString *)name value:(id<NSFastEnumeration> /* WFRect* */)value format:(WFDLoggingFieldFormat)format tags:(int)tags;
  371. @end
  372. #endif // __WFDLoggingFields_DEFINED__
  373. // Windows.Foundation.Diagnostics.LoggingActivity
  374. #ifndef __WFDLoggingActivity_DEFINED__
  375. #define __WFDLoggingActivity_DEFINED__
  376. WINRT_EXPORT
  377. @interface WFDLoggingActivity : RTObject <WFIClosable, WFDILoggingTarget>
  378. + (WFDLoggingActivity*)createLoggingActivity:(NSString *)activityName loggingChannel:(RTObject<WFDILoggingChannel>*)loggingChannel ACTIVATOR;
  379. + (WFDLoggingActivity*)createLoggingActivityWithLevel:(NSString *)activityName loggingChannel:(RTObject<WFDILoggingChannel>*)loggingChannel level:(WFDLoggingLevel)level ACTIVATOR;
  380. @property (readonly) WFGUID* id;
  381. @property (readonly) NSString * name;
  382. @property (readonly) WFDLoggingChannel* channel;
  383. - (void)close;
  384. - (void)stopActivity:(NSString *)stopEventName;
  385. - (void)stopActivityWithFields:(NSString *)stopEventName fields:(WFDLoggingFields*)fields;
  386. - (void)stopActivityWithFieldsAndOptions:(NSString *)stopEventName fields:(WFDLoggingFields*)fields options:(WFDLoggingOptions*)options;
  387. - (BOOL)isEnabled;
  388. - (BOOL)isEnabledWithLevel:(WFDLoggingLevel)level;
  389. - (BOOL)isEnabledWithLevelAndKeywords:(WFDLoggingLevel)level keywords:(int64_t)keywords;
  390. - (void)logEvent:(NSString *)eventName;
  391. - (void)logEventWithFields:(NSString *)eventName fields:(WFDLoggingFields*)fields;
  392. - (void)logEventWithFieldsAndLevel:(NSString *)eventName fields:(WFDLoggingFields*)fields level:(WFDLoggingLevel)level;
  393. - (void)logEventWithFieldsAndOptions:(NSString *)eventName fields:(WFDLoggingFields*)fields level:(WFDLoggingLevel)level options:(WFDLoggingOptions*)options;
  394. - (WFDLoggingActivity*)startActivity:(NSString *)startEventName;
  395. - (WFDLoggingActivity*)startActivityWithFields:(NSString *)startEventName fields:(WFDLoggingFields*)fields;
  396. - (WFDLoggingActivity*)startActivityWithFieldsAndLevel:(NSString *)startEventName fields:(WFDLoggingFields*)fields level:(WFDLoggingLevel)level;
  397. - (WFDLoggingActivity*)startActivityWithFieldsAndOptions:(NSString *)startEventName fields:(WFDLoggingFields*)fields level:(WFDLoggingLevel)level options:(WFDLoggingOptions*)options;
  398. @end
  399. #endif // __WFDLoggingActivity_DEFINED__
  400. // Windows.Foundation.Diagnostics.LoggingChannel
  401. #ifndef __WFDLoggingChannel_DEFINED__
  402. #define __WFDLoggingChannel_DEFINED__
  403. WINRT_EXPORT
  404. @interface WFDLoggingChannel : RTObject <WFDILoggingChannel, WFIClosable, WFDILoggingTarget>
  405. + (WFDLoggingChannel*)createWithOptions:(NSString *)name options:(WFDLoggingChannelOptions*)options ACTIVATOR;
  406. + (WFDLoggingChannel*)createWithOptionsAndId:(NSString *)name options:(WFDLoggingChannelOptions*)options id:(WFGUID*)id ACTIVATOR;
  407. + (WFDLoggingChannel*)create:(NSString *)name ACTIVATOR;
  408. @property (readonly) BOOL enabled;
  409. @property (readonly) WFDLoggingLevel level;
  410. @property (readonly) NSString * name;
  411. @property (readonly) WFGUID* id;
  412. - (EventRegistrationToken)addLoggingEnabledEvent:(void(^)(RTObject<WFDILoggingChannel>*, RTObject*))del;
  413. - (void)removeLoggingEnabledEvent:(EventRegistrationToken)tok;
  414. - (void)logMessage:(NSString *)eventString;
  415. - (void)logMessageWithLevel:(NSString *)eventString level:(WFDLoggingLevel)level;
  416. - (void)logValuePair:(NSString *)value1 value2:(int)value2;
  417. - (void)logValuePairWithLevel:(NSString *)value1 value2:(int)value2 level:(WFDLoggingLevel)level;
  418. - (void)close;
  419. - (BOOL)isEnabled;
  420. - (BOOL)isEnabledWithLevel:(WFDLoggingLevel)level;
  421. - (BOOL)isEnabledWithLevelAndKeywords:(WFDLoggingLevel)level keywords:(int64_t)keywords;
  422. - (void)logEvent:(NSString *)eventName;
  423. - (void)logEventWithFields:(NSString *)eventName fields:(WFDLoggingFields*)fields;
  424. - (void)logEventWithFieldsAndLevel:(NSString *)eventName fields:(WFDLoggingFields*)fields level:(WFDLoggingLevel)level;
  425. - (void)logEventWithFieldsAndOptions:(NSString *)eventName fields:(WFDLoggingFields*)fields level:(WFDLoggingLevel)level options:(WFDLoggingOptions*)options;
  426. - (WFDLoggingActivity*)startActivity:(NSString *)startEventName;
  427. - (WFDLoggingActivity*)startActivityWithFields:(NSString *)startEventName fields:(WFDLoggingFields*)fields;
  428. - (WFDLoggingActivity*)startActivityWithFieldsAndLevel:(NSString *)startEventName fields:(WFDLoggingFields*)fields level:(WFDLoggingLevel)level;
  429. - (WFDLoggingActivity*)startActivityWithFieldsAndOptions:(NSString *)startEventName fields:(WFDLoggingFields*)fields level:(WFDLoggingLevel)level options:(WFDLoggingOptions*)options;
  430. @end
  431. #endif // __WFDLoggingChannel_DEFINED__
  432. // Windows.Foundation.Diagnostics.LoggingSession
  433. #ifndef __WFDLoggingSession_DEFINED__
  434. #define __WFDLoggingSession_DEFINED__
  435. WINRT_EXPORT
  436. @interface WFDLoggingSession : RTObject <WFDILoggingSession, WFIClosable>
  437. + (WFDLoggingSession*)create:(NSString *)name ACTIVATOR;
  438. @property (readonly) NSString * name;
  439. - (void)saveToFileAsync:(RTObject<WSIStorageFolder>*)folder fileName:(NSString *)fileName success:(void (^)(WSStorageFile*))success failure:(void (^)(NSError*))failure;
  440. - (void)addLoggingChannel:(RTObject<WFDILoggingChannel>*)loggingChannel;
  441. - (void)addLoggingChannelWithLevel:(RTObject<WFDILoggingChannel>*)loggingChannel maxLevel:(WFDLoggingLevel)maxLevel;
  442. - (void)removeLoggingChannel:(RTObject<WFDILoggingChannel>*)loggingChannel;
  443. - (void)close;
  444. @end
  445. #endif // __WFDLoggingSession_DEFINED__
  446. // Windows.Foundation.Diagnostics.LogFileGeneratedEventArgs
  447. #ifndef __WFDLogFileGeneratedEventArgs_DEFINED__
  448. #define __WFDLogFileGeneratedEventArgs_DEFINED__
  449. WINRT_EXPORT
  450. @interface WFDLogFileGeneratedEventArgs : RTObject
  451. @property (readonly) WSStorageFile* file;
  452. @end
  453. #endif // __WFDLogFileGeneratedEventArgs_DEFINED__
  454. // Windows.Foundation.Diagnostics.FileLoggingSession
  455. #ifndef __WFDFileLoggingSession_DEFINED__
  456. #define __WFDFileLoggingSession_DEFINED__
  457. WINRT_EXPORT
  458. @interface WFDFileLoggingSession : RTObject <WFDIFileLoggingSession, WFIClosable>
  459. + (WFDFileLoggingSession*)create:(NSString *)name ACTIVATOR;
  460. @property (readonly) NSString * name;
  461. - (EventRegistrationToken)addLogFileGeneratedEvent:(void(^)(RTObject<WFDIFileLoggingSession>*, WFDLogFileGeneratedEventArgs*))del;
  462. - (void)removeLogFileGeneratedEvent:(EventRegistrationToken)tok;
  463. - (void)addLoggingChannel:(RTObject<WFDILoggingChannel>*)loggingChannel;
  464. - (void)addLoggingChannelWithLevel:(RTObject<WFDILoggingChannel>*)loggingChannel maxLevel:(WFDLoggingLevel)maxLevel;
  465. - (void)removeLoggingChannel:(RTObject<WFDILoggingChannel>*)loggingChannel;
  466. - (void)closeAndSaveToFileAsyncWithSuccess:(void (^)(WSStorageFile*))success failure:(void (^)(NSError*))failure;
  467. - (void)close;
  468. @end
  469. #endif // __WFDFileLoggingSession_DEFINED__