zworld-em/Plugins/sentry-unreal/Source/ThirdParty/Mac/include/Sentry/SentryClient.h

113 lines
4.1 KiB
C
Raw Permalink Normal View History

2025-05-11 22:07:21 +08:00
#if __has_include(<Sentry/Sentry.h>)
# import <Sentry/SentryDefines.h>
#else
# import <SentryWithoutUIKit/SentryDefines.h>
#endif
@class SentryOptions, SentryEvent, SentryScope, SentryFileManager, SentryId, SentryUserFeedback,
SentryTransaction;
NS_ASSUME_NONNULL_BEGIN
@interface SentryClient : NSObject
SENTRY_NO_INIT
@property (nonatomic, assign, readonly) BOOL isEnabled;
@property (nonatomic, strong) SentryOptions *options;
/**
* Initializes a @c SentryClient. Pass in a dictionary of options.
* @param options Options dictionary
* @return An initialized @c SentryClient or @c nil if an error occurred.
*/
- (_Nullable instancetype)initWithOptions:(SentryOptions *)options;
/**
* Captures a manually created event and sends it to Sentry.
* @param event The event to send to Sentry.
* @return The @c SentryId of the event or @c SentryId.empty if the event is not sent.
*/
- (SentryId *)captureEvent:(SentryEvent *)event NS_SWIFT_NAME(capture(event:));
/**
* Captures a manually created event and sends it to Sentry.
* @param event The event to send to Sentry.
* @param scope The scope containing event metadata.
* @return The @c SentryId of the event or @c SentryId.empty if the event is not sent.
*/
- (SentryId *)captureEvent:(SentryEvent *)event
withScope:(SentryScope *)scope NS_SWIFT_NAME(capture(event:scope:));
/**
* Captures an error event and sends it to Sentry.
* @param error The error to send to Sentry.
* @return The @c SentryId of the event or @c SentryId.empty if the event is not sent.
*/
- (SentryId *)captureError:(NSError *)error NS_SWIFT_NAME(capture(error:));
/**
* Captures an error event and sends it to Sentry.
* @param error The error to send to Sentry.
* @param scope The scope containing event metadata.
* @return The @c SentryId of the event or @c SentryId.empty if the event is not sent.
*/
- (SentryId *)captureError:(NSError *)error
withScope:(SentryScope *)scope NS_SWIFT_NAME(capture(error:scope:));
/**
* Captures an exception event and sends it to Sentry.
* @param exception The exception to send to Sentry.
* @return The @c SentryId of the event or @c SentryId.empty if the event is not sent.
*/
- (SentryId *)captureException:(NSException *)exception NS_SWIFT_NAME(capture(exception:));
/**
* Captures an exception event and sends it to Sentry.
* @param exception The exception to send to Sentry.
* @param scope The scope containing event metadata.
* @return The @c SentryId of the event or @c SentryId.empty if the event is not sent.
*/
- (SentryId *)captureException:(NSException *)exception
withScope:(SentryScope *)scope NS_SWIFT_NAME(capture(exception:scope:));
/**
* Captures a message event and sends it to Sentry.
* @param message The message to send to Sentry.
* @return The @c SentryId of the event or @c SentryId.empty if the event is not sent.
*/
- (SentryId *)captureMessage:(NSString *)message NS_SWIFT_NAME(capture(message:));
/**
* Captures a message event and sends it to Sentry.
* @param message The message to send to Sentry.
* @param scope The scope containing event metadata.
* @return The @c SentryId of the event or @c SentryId.empty if the event is not sent.
*/
- (SentryId *)captureMessage:(NSString *)message
withScope:(SentryScope *)scope NS_SWIFT_NAME(capture(message:scope:));
/**
* Captures a manually created user feedback and sends it to Sentry.
* @param userFeedback The user feedback to send to Sentry.
*/
- (void)captureUserFeedback:(SentryUserFeedback *)userFeedback
NS_SWIFT_NAME(capture(userFeedback:));
/**
* Waits synchronously for the SDK to flush out all queued and cached items for up to the specified
* timeout in seconds. If there is no internet connection, the function returns immediately. The SDK
* doesn't dispose the client or the hub.
* @param timeout The time to wait for the SDK to complete the flush.
*/
- (void)flush:(NSTimeInterval)timeout NS_SWIFT_NAME(flush(timeout:));
/**
* Disables the client and calls flush with @c SentryOptions.shutdownTimeInterval .
*/
- (void)close;
@end
NS_ASSUME_NONNULL_END