-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathSNMessenger.h
286 lines (237 loc) · 8.38 KB
/
SNMessenger.h
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
#import <AVKit/AVKit.h>
#import "Utilities.h"
#import <variant>
#import <vector>
using namespace std;
@interface NSThread (Debug)
+ (NSString *)ams_symbolicatedCallStackSymbols;
@end
// A trick to use "case/switch" with string
#define SwitchStr(s) for (const char *__s__ = (s) ; ; )
#define CaseEqual(str) if (strcmp(str, __s__) == 0)
#define CaseStart(str) if (strncmp(str, __s__, strlen(str)) == 0)
#define Default
//========== TYPE LOOKUP TABLE (NEW) ==========||========== TYPE LOOKUP TABLE (OLD) ==========//
// || //
// 0: Bool 7: MCFTypeRef || 0: Bool 7: Weak Object //
// 1: (Unsigned) Int32 8: SEL || 1: (Unsigned) Int32 8: MCFTypeRef //
// 2: (Unsigned) Int64 9: CGRect || 2: (Unsigned) Int64 9: CGRect //
// 3: Double 10: CGSize || 3: Double 10: CGSize //
// 4: Float 11: CGPoint || 4: Float 11: CGPoint //
// 5: Strong Object 12: NSRange || 5: Struct 12: NSRange //
// 6: Weak Object 13: UIEdgeInsets || 6: Strong Object 13: UIEdgeInsets //
// || //
//===============================================||===============================================//
NSString *(^typeLookup)(const char *, NSUInteger) = ^NSString *(const char *encoding, NSUInteger type) {
SwitchStr (encoding) {
CaseEqual ("B") { return @"Bool"; }
CaseEqual ("i") { return @"Int"; }
CaseEqual ("I") { return @"Unsigned Int32"; }
CaseEqual ("q") { return @"Int64"; }
CaseEqual ("Q") { return @"Unsigned Int64"; }
CaseEqual ("d") { return @"Double"; }
CaseEqual ("f") { return @"Float"; }
CaseEqual (":") { return @"Selector"; }
CaseEqual ("@") {
if (type < 8) {
switch (type - !IS_IOS_OR_NEWER(iOS_15_1)) {
case 5: return @"Strong Object";
case 6: return @"Weak Object";
}
}
switch (type) {
case 9: return @"CGRect";
case 10: return @"CGSize";
case 11: return @"CGPoint";
case 12: return @"NSRange";
case 13: return @"UIEdgeInsets";
default: break;
}
}
CaseStart ("^{") {
switch (type) {
case 5: return @"Struct"; // v458.0.0
case 7:
case 8: {
return @"MCFTypeRef";
}
default: break;
}
}
Default {
RLog(@"encoding: %s | type: %lu", encoding, type);
return @"";
}
}
};
typedef struct {
NSString *field_0;
const char *encoding_0;
NSUInteger sizeof_0;
NSUInteger type_0;
NSString *field_1;
const char *encoding_1;
NSUInteger sizeof_1;
NSUInteger type_1;
NSString *field_2;
const char *encoding_2;
NSUInteger sizeof_2;
NSUInteger type_2;
NSString *field_3;
const char *encoding_3;
NSUInteger sizeof_3;
NSUInteger type_3;
NSString *field_4;
const char *encoding_4;
NSUInteger sizeof_4;
NSUInteger type_4;
NSString *field_5;
const char *encoding_5;
NSUInteger sizeof_5;
NSUInteger type_5;
NSString *field_6;
const char *encoding_6;
NSUInteger sizeof_6;
NSUInteger type_6;
NSString *field_7;
const char *encoding_7;
NSUInteger sizeof_7;
NSUInteger type_7;
NSString *field_8;
const char *encoding_8;
NSUInteger sizeof_8;
NSUInteger type_8;
NSString *field_9;
const char *encoding_9;
NSUInteger sizeof_9;
NSUInteger type_9;
NSString *field_10;
const char *encoding_10;
NSUInteger sizeof_10;
NSUInteger type_10;
// ...
} MSGModelFieldInfo;
typedef struct {
const char *name;
NSUInteger numberOfFields;
MSGModelFieldInfo *fieldInfo;
struct MSGCQLResultSetInfo *resultSet;
BOOL var4;
void *var5;
} MSGModelInfo;
typedef struct {
const char *name;
NSInteger subtype;
} MSGModelADTInfo;
@interface MSGModel : NSObject
+ (instancetype)newADTModelWithInfo:(MSGModelInfo *)info adtInfo:(MSGModelADTInfo *)adtInfo;
+ (instancetype)newADTModelWithInfo:(MSGModelInfo *)info adtValueSubtype:(NSInteger)adtValueSubtype; // v458.0.0
+ (instancetype)newWithModelInfo:(MSGModelInfo *)info; // adtValueSubtype = -1
- (void)setBoolValue:(BOOL)value forFieldIndex:(NSUInteger)index;
- (void)setInt64Value:(NSInteger)value forFieldIndex:(NSUInteger)index;
- (void)setObjectValue:(id)value forFieldIndex:(NSUInteger)index;
- (void)setValueForField:(NSString *)name, /* value: */ ...;
- (id)valueAtFieldIndex:(NSUInteger)index;
- (NSMutableDictionary *)debugMSGModel;
@end
@interface MSGModelWeakObjectContainer : NSObject
- (id)value;
@end
using MSGModelTypes = vector<variant<bool, int, long long, double, float, id, MSGModelWeakObjectContainer *, void *, SEL *>, allocator<variant<bool, int, long long, double, float, id, MSGModelWeakObjectContainer *, void *, SEL *>>>;
@interface MSGInboxViewController : UIViewController
@end
@interface MDSNavigationController : UINavigationController
@property (nonatomic, retain) UIBarButtonItem *eyeItem;
@property (nonatomic, retain) UIBarButtonItem *settingsItem;
@end
@interface LSVideoPlayerView : UIView
- (CMTime)duration;
@end
@interface LSContactListViewController : UIViewController
@end
@interface LSTabBarDataSource : NSObject
@end
@interface FBAnalytics : NSObject
+ (instancetype)sharedAnalytics;
- (NSString *)userFBID;
@end
@interface LSMediaPickerViewController : UIViewController
- (void)_stopHDAnimationAndToggleHD;
@end
@interface MSGStoryOverlayProfileViewActionStandard : MSGModel
@end
@interface MSGStoryViewerOverflowMenuActionTypeSave : MSGModel
@end
@interface LSStoryOverlayProfileView : UIView
@end
@interface LSStoryBucketViewControllerBase : UIViewController
@property (nonatomic, copy, readwrite) NSString *ownerId;
- (CGFloat)getDurationFromPlayerView:(LSVideoPlayerView *)playerView;
- (CGFloat)storyDuration;
- (void)_updateProgressIndicator;
@end
@interface LSStoryBucketViewController : LSStoryBucketViewControllerBase
@property (nonatomic, assign) BOOL isSelfStory;
@property (nonatomic, assign) CGFloat duration;
@end
@interface MSGStoryViewerBucketModel : MSGModel
- (int)bucketType;
@end
@interface MSGTempMessageListItemModel : NSObject
- (NSString *)messageId;
@end
@interface MSGThreadListDataSource : NSObject
- (BOOL)isInitializationComplete;
@end
@interface MSGThreadViewOptions : MSGModel
@end
@interface MSGThreadViewControllerOptions : MSGModel
- (MSGThreadViewOptions *)viewOptions;
@end
@interface PLUIEditVideoViewController : UIViewController
- (void)_trimVideo:(UIBarButtonItem *)arg1;
@end
@interface PHObject : NSObject
@end
@interface PHAsset : PHObject
@property (nonatomic, readonly, assign) CGFloat duration;
@end
@interface MSGMessageListViewModelGenerator : NSObject
@end
@interface MSGThreadListUnitsSate : MSGModel
- (NSMutableDictionary *)unitKeyToUnit;
@end
@interface MSGInboxUnitPositionInThreadList : MSGModel
- (NSInteger)belowThreadIndex;
@end
@interface MSGInboxUnit : MSGModel
- (MSGInboxUnitPositionInThreadList *)positionInThreadList;
@end
@interface MSGStoryCardToolbox : MSGModel
@end
typedef struct {
const char *key;
const char *subKey;
} MSGCSessionedMobileConfig;
@interface MDSTabBarController : UITabBarController
@end
@interface MDSTabBarItemProps : MSGModel
- (NSString *)accessibilityIdentifierText;
@end
@interface MSGTabBarItemInfo : MSGModel
- (MDSTabBarItemProps *)props;
@end
@interface MSGNavigationCoordinator_LSNavigationCoordinatorProxy : NSObject
- (void)dismissViewControllerAnimated:(BOOL)arg1 completion:(id)arg2;
- (void)presentAlertWithCompletion:(void (^)(BOOL))completion;
- (void)presentViewController:(id)arg1 presentationStyle:(NSInteger)arg2 animated:(BOOL)arg3 completion:(id)arg4;
@end
@interface LSRTCCallIntent : MSGModel
- (MSGNavigationCoordinator_LSNavigationCoordinatorProxy *)navigationCoordinator;
@end
@interface LSRTCCallIntentValidatorParams : MSGModel
- (LSRTCCallIntent *)callIntent;
@end
@interface MSGMediaVideoPhasset : MSGModel
- (id)asset;
@end