You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
2.0 KiB

//
// MOBFLogService.h
// MOBFoundation
//
// Created by 冯鸿杰 on 17/2/16.
// Copyright © 2017年 MOB. All rights reserved.
//
#import <Foundation/Foundation.h>
@class MOBFLogService;
/**
*/
@protocol MOBFLogServiceDelegate <NSObject>
/**
@param logService
@param logs
@return YES NO
*/
- (BOOL)logService:(MOBFLogService *)logService
needsSendLogs:(NSArray *)logs;
/**
@param logService
@param logs
@param result YESNO
*/
- (void)logService:(MOBFLogService *)logService
didSendLogs:(NSArray *)logs
result:(void (^)(BOOL succeed, NSArray *sentLogs))result;
@end
/**
*/
@interface MOBFLogService : NSObject
/**
*/
@property (nonatomic, weak) id<MOBFLogServiceDelegate> delegate;
/**
*/
@property (nonatomic) NSInteger failRetryMaxCount;
/**
@param name
@return
*/
- (instancetype)initWithName:(NSString *)name;
/**
@param name
@param secretKey AES
@return
*/
- (instancetype)initWithName:(NSString *)name
secretKey:(NSString *)secretKey;
/**
@param data
*/
- (void)writeData:(id<NSCoding>)data;
/**
@param data
*/
- (void)syncWriteData:(id<NSCoding>)data;
/**
*/
- (void)needsSendLog;
/**
@param time
*/
- (void)needsSendLogAfterTime:(NSTimeInterval)time;
@end