洛阳学员端
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.

49 lines
1.2 KiB

8 months ago
  1. //
  2. // APMmMPLogFile.h
  3. // MPRemoteLogging
  4. //
  5. // Created by tashigaofei on 14-6-16.
  6. // Copyright (c) 2014年 Alpay. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @class DTFLogIndex;
  10. typedef BOOL (^FileFilter) (CFTimeInterval time);
  11. @interface DTFLogFile : NSObject
  12. @property (nonatomic, assign) BOOL uploadable;
  13. @property (nonatomic, assign) unsigned long triggerCount;
  14. @property (nonatomic, copy) FileFilter timeFilter;
  15. @property (nonatomic, assign) off_t size;
  16. @property (nonatomic, assign) unsigned long unSyncCount;
  17. +(instancetype) logFileWithName:(NSString *) name;
  18. -(DTFLogIndex*) writeLog:(NSString *)logString;
  19. -(NSData *) dataForIndex:(DTFLogIndex *) index;
  20. -(void) markIndex:(DTFLogIndex *) index;
  21. -(NSArray *) makeUnSyncLogIndex;
  22. -(void) removeWeakCache;
  23. -(NSString *)description;
  24. -(void) markFile;
  25. -(BOOL) isMarked;
  26. +(char*)checkCode;
  27. -(BOOL)shouldFlush;
  28. -(BOOL) isUsing;
  29. -(BOOL)isExist;
  30. @end
  31. @interface DTFLogIndex : NSObject
  32. @property (nonatomic, assign) char flag;
  33. @property (nonatomic, assign) NSUInteger offset;
  34. @property (nonatomic, assign) NSUInteger length;
  35. @property (nonatomic, assign) CFTimeInterval time;
  36. @property (nonatomic, strong) DTFLogFile *file;
  37. - (NSString*)uniqueId;
  38. @end