Peter 76e5a7fab6 Add 'submodules/HockeySDK-iOS/' from commit 'c7d0c7026303253e2ac576c02655691e5d314fe2'
git-subtree-dir: submodules/HockeySDK-iOS
git-subtree-mainline: 085acd26c4432939403765234266e3c1be0f3dd9
git-subtree-split: c7d0c7026303253e2ac576c02655691e5d314fe2
2019-06-11 18:53:14 +01:00

48 lines
1.3 KiB
Objective-C

#import <Foundation/Foundation.h>
#import "HockeySDKFeatureConfig.h"
#if HOCKEYSDK_FEATURE_METRICS
@class BITConfiguration;
@class BITTelemetryData;
@class BITTelemetryContext;
@class BITPersistence;
#import "HockeySDKNullability.h"
NS_ASSUME_NONNULL_BEGIN
/**
* Buffer of telemtry events, will be written to disk. Make sure the buffer is used in a threadsafe way.
*/
FOUNDATION_EXPORT char *_Nullable BITTelemetryEventBuffer;
/**
* Items get queued before they are persisted and sent out as a batch. This class managed the queue, and forwards the batch
* to the persistence layer once the max batch count has been reached.
*/
@interface BITChannel : NSObject
/**
* Initializes a new BITChannel instance.
*
* @param telemetryContext the context used to add context values to the metrics payload
* @param persistence the persistence used to save metrics after the queue gets flushed
*
* @return the telemetry context
*/
- (instancetype)initWithTelemetryContext:(BITTelemetryContext *)telemetryContext persistence:(BITPersistence *) persistence;
/**
* Reset BITSafeJsonEventsString so we can start appending JSON dictionaries.
*
* @param item The telemetry object, which should be processed
*/
- (void)enqueueTelemetryItem:(BITTelemetryData *)item;
@end
NS_ASSUME_NONNULL_END
#endif /* HOCKEYSDK_FEATURE_METRICS */