1
0
mirror of https://github.com/danog/Telegram.git synced 2024-11-30 04:29:15 +01:00
Telegram/Share/PSKeyValueReader.h

25 lines
977 B
C
Raw Permalink Normal View History

2015-10-01 18:19:52 +02:00
#import <Foundation/Foundation.h>
#import "PSData.h"
typedef enum {
PSKeyValueReaderSelectLowerKey = 0,
PSKeyValueReaderSelectHigherKey = 1
} PSKeyValueReaderSelectKey;
typedef enum {
PSKeyValueReaderEnumerationReverse = 1,
PSKeyValueReaderEnumerationLowerBoundExclusive = 2,
PSKeyValueReaderEnumerationUpperBoundExclusive = 4
} PSKeyValueReaderEnumerationOptions;
@protocol PSKeyValueReader <NSObject>
- (bool)readValueForRawKey:(PSConstData *)key value:(PSConstData *)value;
- (bool)readValueBetweenLowerBoundKey:(PSConstData *)lowerBoundKey upperBoundKey:(PSConstData *)upperBoundKey selectKey:(PSKeyValueReaderSelectKey)selectKey selectedKey:(PSConstData *)selectedKey selectedValue:(PSConstData *)selectedValue;
- (void)enumerateKeysAndValuesBetweenLowerBoundKey:(PSConstData *)lowerBoundKey upperBoundKey:(PSConstData *)upperBoundKey options:(NSInteger)options withBlock:(void (^)(PSConstData *key, PSConstData *value, bool *stop))block;
@end