blob: 94ab964220adb4f002b9535b367c808013a8eb94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
// Copyright 2005-2012 The MumbleKit Developers. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
typedef union _float32u {
uint8_t b[4];
float f;
} float32u;
@interface MKPacketDataStream : NSObject
- (id) initWithData:(NSData *)data;
- (id) initWithBuffer:(unsigned char *)buffer length:(NSUInteger)len;
- (void) dealloc;
- (NSUInteger) size;
- (NSUInteger) capactiy;
- (NSUInteger) left;
- (BOOL) valid;
- (void) rewind;
- (void) truncate;
- (unsigned char *) dataPtr;
- (char *) charPtr;
- (NSData *) data;
- (NSMutableData *) mutableData;
- (void) appendValue:(uint64_t)value;
- (void) appendBytes:(unsigned char *)buffer length:(NSUInteger)len;
- (void) skip:(NSUInteger)amount;
- (uint64_t) next;
- (uint8_t) next8;
- (void) addVarint:(uint64_t)value;
- (uint64_t) getVarint;
- (int) getInt;
- (unsigned int) getUnsignedInt;
- (short) getShort;
- (unsigned short) getUnsignedShort;
- (char) getChar;
- (unsigned char) getUnsignedChar;
- (float) getFloat;
- (double) getDouble;
- (NSData *) copyDataBlock:(NSUInteger)len;
@end
|