-
-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Update view hierarchy attachment format to Json (#2491)
Change view hierarchy format to conform to RFC 33 Closes GH-2467
- Loading branch information
Showing
30 changed files
with
705 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#import "SentrySerializable.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface SentryEnvelopeItemHeader : NSObject <SentrySerializable> | ||
SENTRY_NO_INIT | ||
|
||
- (instancetype)initWithType:(NSString *)type length:(NSUInteger)length NS_DESIGNATED_INITIALIZER; | ||
|
||
- (instancetype)initWithType:(NSString *)type | ||
length:(NSUInteger)length | ||
filenname:(NSString *)filename | ||
contentType:(NSString *)contentType; | ||
|
||
/** | ||
* The type of the envelope item. | ||
*/ | ||
@property (nonatomic, readonly, copy) NSString *type; | ||
@property (nonatomic, readonly) NSUInteger length; | ||
@property (nonatomic, readonly, copy, nullable) NSString *filename; | ||
@property (nonatomic, readonly, copy, nullable) NSString *contentType; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#import "SentryEnvelopeAttachmentHeader.h" | ||
#import "SentryEnvelope+Private.h" | ||
|
||
@implementation SentryEnvelopeAttachmentHeader | ||
|
||
- (instancetype)initWithType:(NSString *)type length:(NSUInteger)length | ||
{ | ||
if (self = [super initWithType:type length:length]) { | ||
_attachmentType = kSentryAttachmentTypeEventAttachment; | ||
} | ||
return self; | ||
} | ||
|
||
- (instancetype)initWithType:(NSString *)type | ||
length:(NSUInteger)length | ||
filename:(NSString *)filename | ||
contentType:(NSString *)contentType | ||
attachmentType:(SentryAttachmentType)attachmentType | ||
{ | ||
|
||
if (self = [self initWithType:type length:length filenname:filename contentType:contentType]) { | ||
_attachmentType = attachmentType; | ||
} | ||
return self; | ||
} | ||
|
||
- (NSDictionary *)serialize | ||
{ | ||
NSMutableDictionary *result = [[super serialize] mutableCopy]; | ||
[result setObject:nameForSentryAttachmentType(self.attachmentType) forKey:@"attachment_type"]; | ||
return result; | ||
} | ||
|
||
@end |
Oops, something went wrong.