|
| 1 | +// Copyright (c) 2025 Sentry. All Rights Reserved. |
| 2 | + |
| 3 | +#pragma once |
| 4 | + |
| 5 | +#include "Interface/SentrySubsystemInterface.h" |
| 6 | + |
| 7 | +class FNullSentrySubsystem : public ISentrySubsystem |
| 8 | +{ |
| 9 | +public: |
| 10 | + virtual ~FNullSentrySubsystem() override = default; |
| 11 | + |
| 12 | + virtual void InitWithSettings(const USentrySettings* settings, USentryBeforeSendHandler* beforeSendHandler, USentryBeforeBreadcrumbHandler* beforeBreadcrumbHandler, USentryTraceSampler* traceSampler) override {} |
| 13 | + virtual void Close() override {} |
| 14 | + virtual bool IsEnabled() override { return false; } |
| 15 | + virtual ESentryCrashedLastRun IsCrashedLastRun() override { return ESentryCrashedLastRun::NotEvaluated; } |
| 16 | + virtual void AddBreadcrumb(TSharedPtr<ISentryBreadcrumb> breadcrumb) override {} |
| 17 | + virtual void AddBreadcrumbWithParams(const FString& Message, const FString& Category, const FString& Type, const TMap<FString, FString>& Data, ESentryLevel Level) override {} |
| 18 | + virtual void ClearBreadcrumbs() override {} |
| 19 | + virtual TSharedPtr<ISentryId> CaptureMessage(const FString& message, ESentryLevel level) override { return nullptr; } |
| 20 | + virtual TSharedPtr<ISentryId> CaptureMessageWithScope(const FString& message, ESentryLevel level, const FSentryScopeDelegate& onConfigureScope) override { return nullptr; } |
| 21 | + virtual TSharedPtr<ISentryId> CaptureEvent(TSharedPtr<ISentryEvent> event) override { return nullptr; } |
| 22 | + virtual TSharedPtr<ISentryId> CaptureEventWithScope(TSharedPtr<ISentryEvent> event, const FSentryScopeDelegate& onScopeConfigure) override { return nullptr; } |
| 23 | + virtual TSharedPtr<ISentryId> CaptureEnsure(const FString& type, const FString& message) override { return nullptr; } |
| 24 | + virtual void CaptureUserFeedback(TSharedPtr<ISentryUserFeedback> userFeedback) override {} |
| 25 | + virtual void SetUser(TSharedPtr<ISentryUser> user) override {} |
| 26 | + virtual void RemoveUser() override {} |
| 27 | + virtual void ConfigureScope(const FSentryScopeDelegate& onConfigureScope) override {} |
| 28 | + virtual void SetContext(const FString& key, const TMap<FString, FString>& values) override {} |
| 29 | + virtual void SetTag(const FString& key, const FString& value) override {} |
| 30 | + virtual void RemoveTag(const FString& key) override {} |
| 31 | + virtual void SetLevel(ESentryLevel level) override {} |
| 32 | + virtual void StartSession() override {} |
| 33 | + virtual void EndSession() override {} |
| 34 | + virtual TSharedPtr<ISentryTransaction> StartTransaction(const FString& name, const FString& operation) override { return nullptr; } |
| 35 | + virtual TSharedPtr<ISentryTransaction> StartTransactionWithContext(TSharedPtr<ISentryTransactionContext> context) override { return nullptr; } |
| 36 | + virtual TSharedPtr<ISentryTransaction> StartTransactionWithContextAndTimestamp(TSharedPtr<ISentryTransactionContext> context, int64 timestamp) override { return nullptr; } |
| 37 | + virtual TSharedPtr<ISentryTransaction> StartTransactionWithContextAndOptions(TSharedPtr<ISentryTransactionContext> context, const TMap<FString, FString>& options) override { return nullptr; } |
| 38 | + virtual TSharedPtr<ISentryTransactionContext> ContinueTrace(const FString& sentryTrace, const TArray<FString>& baggageHeaders) override { return nullptr; } |
| 39 | +}; |
| 40 | + |
| 41 | +typedef FNullSentrySubsystem FPlatformSentrySubsystem; |
0 commit comments