Compare commits
29 Commits
Kordophone
...
kordophone
| Author | SHA1 | Date | |
|---|---|---|---|
| 7cceb5b92d | |||
| 3f03937ca4 | |||
| d706435103 | |||
| e1ec237053 | |||
| a9c2f5d93e | |||
| 1dc6f0ec1b | |||
| e97edc10b7 | |||
| 283e6c2218 | |||
| f040b95827 | |||
| 7352efbcfd | |||
| 78eb946109 | |||
| 1a5bb874dc | |||
| 7339b49759 | |||
| 95c2e855dd | |||
|
|
d0e1f51b6b | ||
| 9007b4503f | |||
| 030e86e205 | |||
|
|
b7312bccb9 | ||
| 58c84f6472 | |||
| 413fe338ca | |||
| 72527088cc | |||
| c65803845b | |||
|
|
147dc15d1d | ||
|
|
87d65e294b | ||
| b92c683a0e | |||
|
|
37ff0b375f | ||
|
|
d071e68a56 | ||
|
|
2f5d50188b | ||
|
|
56ae7982c6 |
@@ -1754,10 +1754,13 @@ __attribute__((visibility("default"))) @interface IMService : NSObject { }
|
|||||||
@property(nonatomic) BOOL chatInScrutinyMode; // @synthesize chatInScrutinyMode=_chatInScrutinyMode;
|
@property(nonatomic) BOOL chatInScrutinyMode; // @synthesize chatInScrutinyMode=_chatInScrutinyMode;
|
||||||
@property(readonly, nonatomic) NSArray *messageEditChatItems; // @synthesize messageEditChatItems=_messageEditChatItems;
|
@property(readonly, nonatomic) NSArray *messageEditChatItems; // @synthesize messageEditChatItems=_messageEditChatItems;
|
||||||
@property(retain, nonatomic, setter=_setVisibleAssociatedMessageChatItems:) NSArray *visibleAssociatedMessageChatItems; // @synthesize visibleAssociatedMessageChatItems=_visibleAssociatedMessageChatItems;
|
@property(retain, nonatomic, setter=_setVisibleAssociatedMessageChatItems:) NSArray *visibleAssociatedMessageChatItems; // @synthesize visibleAssociatedMessageChatItems=_visibleAssociatedMessageChatItems;
|
||||||
@property(nonatomic) struct _NSRange messagePartRange; // @synthesize messagePartRange=_messagePartRange;
|
|
||||||
@property(nonatomic) long long index; // @synthesize index=_index;
|
@property(nonatomic) long long index; // @synthesize index=_index;
|
||||||
@property(readonly, copy, nonatomic) NSAttributedString *text; // @synthesize text=_text;
|
@property(readonly, copy, nonatomic) NSAttributedString *text; // @synthesize text=_text;
|
||||||
|
|
||||||
|
@property (nonatomic, copy, readonly) NSString *threadIdentifier;
|
||||||
|
@property(nonatomic) struct _NSRange messagePartRange; // @synthesize messagePartRange=_messagePartRange;
|
||||||
|
|
||||||
|
|
||||||
- (BOOL)canSendMessageAcknowledgment;
|
- (BOOL)canSendMessageAcknowledgment;
|
||||||
- (void)_setMessageEditChatItems:(id)arg1;
|
- (void)_setMessageEditChatItems:(id)arg1;
|
||||||
- (id)_initWithItem:(id)arg1 text:(id)arg2 index:(long long)arg3 messagePartRange:(struct _NSRange)arg4 visibleAssociatedMessageChatItems:(id)arg5;
|
- (id)_initWithItem:(id)arg1 text:(id)arg2 index:(long long)arg3 messagePartRange:(struct _NSRange)arg4 visibleAssociatedMessageChatItems:(id)arg5;
|
||||||
@@ -3680,6 +3683,68 @@ __attribute__((visibility("default"))) @interface IMService : NSObject { }
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
typedef NS_ENUM(NSInteger, IMMessageDescriptionType) {
|
||||||
|
IMMessageDescriptionAccessibility,
|
||||||
|
IMMessageDescriptionAcknowledgement,
|
||||||
|
IMMessageDescriptionConversationList,
|
||||||
|
IMMessageDescriptionNotification,
|
||||||
|
IMMessageDescriptionSiri,
|
||||||
|
IMMessageDescriptionSPI,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef NS_ENUM(int64_t, IMAssociatedMessageType) {
|
||||||
|
IMAssociatedMessageTypeUnspecified = 0,
|
||||||
|
|
||||||
|
IMAssociatedMessageTypeBreadcrumbUnconsumed = 2,
|
||||||
|
IMAssociatedMessageTypeBreadcrumbConsumed = 3,
|
||||||
|
IMAssociatedMessageTypeSticker = 1000,
|
||||||
|
IMAssociatedMessageTypeEmojiSticker = 1001,
|
||||||
|
|
||||||
|
IMAssociatedMessageTypeAcknowledgmentHeart = 2000,
|
||||||
|
IMAssociatedMessageTypeAcknowledgmentThumbsUp = 2001,
|
||||||
|
IMAssociatedMessageTypeAcknowledgmentThumbsDown = 2002,
|
||||||
|
IMAssociatedMessageTypeAcknowledgmentHa = 2003,
|
||||||
|
IMAssociatedMessageTypeAcknowledgmentExclamation = 2004,
|
||||||
|
IMAssociatedMessageTypeAcknowledgmentQuestionMark = 2005,
|
||||||
|
|
||||||
|
IMAssociatedMessageTypeAcknowledgmentHeartRemoved = 3000,
|
||||||
|
IMAssociatedMessageTypeAcknowledgmentThumbsUpRemoved = 3001,
|
||||||
|
IMAssociatedMessageTypeAcknowledgmentThumbsDownRemoved = 3002,
|
||||||
|
IMAssociatedMessageTypeAcknowledgmentHaRemoved = 3003,
|
||||||
|
IMAssociatedMessageTypeAcknowledgmentExclamationRemoved = 3004,
|
||||||
|
IMAssociatedMessageTypeAcknowledgmentQuestionMarkRemoved = 3005,
|
||||||
|
};
|
||||||
|
|
||||||
|
extern NSString * const IMMessageSummaryInfoSummary;
|
||||||
|
extern NSString * const IMMessageSummaryInfoContentType;
|
||||||
|
extern NSString * const IMMessageSummaryInfoPluginBundleID;
|
||||||
|
extern NSString * const IMMessageSummaryInfoPluginDisplayName;
|
||||||
|
extern NSString * const IMMessageSummaryInfoAssociatedBalloonBundleID;
|
||||||
|
extern NSString * const IMMessageSummaryInfoSourceApplicationID;
|
||||||
|
extern NSString * const IMMessageSummaryInfoUpdatedDateWithServerTime;
|
||||||
|
extern NSString * const IMMessageSummaryInfoHasBeenRetried;
|
||||||
|
extern NSString * const IMMessageSummaryInfoTapbackRepresentationKey;
|
||||||
|
extern NSString * const IMMessageSummaryInfoStickerRepositioningKey;
|
||||||
|
extern NSString * const IMMessageSummaryInfoTranscriptSharingMessageTypeKey;
|
||||||
|
extern NSString * const IMMessageSummaryInfoTranscriptSharingMessageFirstItemKey;
|
||||||
|
extern NSString * const IMMessageSummaryInfoEditedPartIndexes;
|
||||||
|
extern NSString * const IMMessageSummaryInfoRetractedPartIndexes;
|
||||||
|
extern NSString * const IMMessageSummaryInfoOriginalTextRangesByPartIndex;
|
||||||
|
extern NSString * const IMMessageSummaryInfoOriginalTextRangeLocationSubKey;
|
||||||
|
extern NSString * const IMMessageSummaryInfoOriginalTextRangeLengthSubKey;
|
||||||
|
extern NSString * const IMMessageSummaryInfoEditDeliveryFailedForPartIndexes;
|
||||||
|
extern NSString * const IMMessageSummaryInfoRetractDeliveryFailedForPartIndexes;
|
||||||
|
extern NSString * const IMMessageSummaryInfoEditUnsupportedByHandleIDs;
|
||||||
|
extern NSString * const IMMessageSummaryInfoTranslatedText;
|
||||||
|
extern NSString * const IMMessageSummaryInfoDetectedLanguage;
|
||||||
|
extern NSString * const IMMessageSummaryInfoCMMState;
|
||||||
|
extern NSString * const IMMessageSummaryInfoCMMAssetOffset;
|
||||||
|
extern NSString * const IMMessageItemErrorDomain;
|
||||||
|
extern NSString * const IMMessageSentDistributedNotification;
|
||||||
|
extern NSString * const IMMessageSentDistributedNotificationUserInfoMessageGUIDKey;
|
||||||
|
extern NSString * const IMMessageSentDistributedNotificationUserInfoSucessKey;
|
||||||
|
|
||||||
|
|
||||||
@interface IMMessage : NSObject <NSCopying>
|
@interface IMMessage : NSObject <NSCopying>
|
||||||
{
|
{
|
||||||
IMHandle *_sender;
|
IMHandle *_sender;
|
||||||
@@ -3735,6 +3800,22 @@ __attribute__((visibility("default"))) @interface IMService : NSObject { }
|
|||||||
+ (id)breadcrumbMessageWithText:(id)arg1 associatedMessageGUID:(id)arg2 balloonBundleID:(id)arg3 fileTransferGUIDs:(id)arg4 payloadData:(id)arg5;
|
+ (id)breadcrumbMessageWithText:(id)arg1 associatedMessageGUID:(id)arg2 balloonBundleID:(id)arg3 fileTransferGUIDs:(id)arg4 payloadData:(id)arg5;
|
||||||
+ (id)editedMessageWithOriginalMessage:(id)arg1 originalPrefixedGUID:(id)arg2 newBody:(id)arg3;
|
+ (id)editedMessageWithOriginalMessage:(id)arg1 originalPrefixedGUID:(id)arg2 newBody:(id)arg3;
|
||||||
+ (id)instantMessageWithAssociatedMessageContent:(id)arg1 flags:(unsigned long long)arg2 associatedMessageGUID:(id)arg3 associatedMessageType:(long long)arg4 associatedMessageRange:(struct _NSRange)arg5 messageSummaryInfo:(id)arg6;
|
+ (id)instantMessageWithAssociatedMessageContent:(id)arg1 flags:(unsigned long long)arg2 associatedMessageGUID:(id)arg3 associatedMessageType:(long long)arg4 associatedMessageRange:(struct _NSRange)arg5 messageSummaryInfo:(id)arg6;
|
||||||
|
|
||||||
|
+ (instancetype)instantMessageWithAssociatedMessageContent:(NSAttributedString *) content
|
||||||
|
flags:(IMMessageFlags)flags
|
||||||
|
associatedMessageGUID:(NSString*) associatedMessageGUID
|
||||||
|
associatedMessageType:(IMAssociatedMessageType) associatedMessageType
|
||||||
|
associatedMessageRange:(NSRange) associatedMessageRange
|
||||||
|
messageSummaryInfo:(NSDictionary*) messageSummaryInfo
|
||||||
|
threadIdentifier:(NSString *)threadIdentifier;
|
||||||
|
|
||||||
|
+ (instancetype)breadcrumbMessageWithText:(NSAttributedString *)text
|
||||||
|
associatedMessageGUID:(NSString *)messageGUID
|
||||||
|
balloonBundleID:(NSString *)balloonBundleID
|
||||||
|
fileTransferGUIDs:(NSArray<NSString *> *)fileTransferGUIDs
|
||||||
|
payloadData:(NSData *)payloadData
|
||||||
|
threadIdentifier:(NSString *)threadIdentifier;
|
||||||
|
|
||||||
@property(nonatomic) unsigned long long sortID; // @synthesize sortID=_sortID;
|
@property(nonatomic) unsigned long long sortID; // @synthesize sortID=_sortID;
|
||||||
@property(nonatomic) BOOL isSOS; // @synthesize isSOS=_isSOS;
|
@property(nonatomic) BOOL isSOS; // @synthesize isSOS=_isSOS;
|
||||||
@property(retain, nonatomic) NSString *notificationIDSTokenURI; // @synthesize notificationIDSTokenURI=_notificationIDSTokenURI;
|
@property(retain, nonatomic) NSString *notificationIDSTokenURI; // @synthesize notificationIDSTokenURI=_notificationIDSTokenURI;
|
||||||
@@ -3804,8 +3885,8 @@ __attribute__((visibility("default"))) @interface IMService : NSObject { }
|
|||||||
- (id)_initWithSender:(id)arg1 time:(id)arg2 timeRead:(id)arg3 timeDelivered:(id)arg4 timePlayed:(id)arg5 plainText:(id)arg6 text:(id)arg7 messageSubject:(id)arg8 fileTransferGUIDs:(id)arg9 flags:(unsigned long long)arg10 error:(id)arg11 guid:(id)arg12 messageID:(long long)arg13 subject:(id)arg14 balloonBundleID:(id)arg15 payloadData:(id)arg16 expressiveSendStyleID:(id)arg17 timeExpressiveSendPlayed:(id)arg18 associatedMessageGUID:(id)arg19 associatedMessageType:(long long)arg20 associatedMessageRange:(struct _NSRange)arg21 messageSummaryInfo:(id)arg22;
|
- (id)_initWithSender:(id)arg1 time:(id)arg2 timeRead:(id)arg3 timeDelivered:(id)arg4 timePlayed:(id)arg5 plainText:(id)arg6 text:(id)arg7 messageSubject:(id)arg8 fileTransferGUIDs:(id)arg9 flags:(unsigned long long)arg10 error:(id)arg11 guid:(id)arg12 messageID:(long long)arg13 subject:(id)arg14 balloonBundleID:(id)arg15 payloadData:(id)arg16 expressiveSendStyleID:(id)arg17 timeExpressiveSendPlayed:(id)arg18 associatedMessageGUID:(id)arg19 associatedMessageType:(long long)arg20 associatedMessageRange:(struct _NSRange)arg21 messageSummaryInfo:(id)arg22;
|
||||||
- (id)_copyWithFlags:(unsigned long long)arg1;
|
- (id)_copyWithFlags:(unsigned long long)arg1;
|
||||||
- (id)copyWithZone:(struct _NSZone *)arg1;
|
- (id)copyWithZone:(struct _NSZone *)arg1;
|
||||||
- (id)descriptionForPurpose:(long long)arg1 inChat:(id)arg2;
|
- (id)descriptionForPurpose:(IMMessageDescriptionType)arg1 inChat:(id)arg2;
|
||||||
- (id)descriptionForPurpose:(long long)arg1;
|
- (id)descriptionForPurpose:(IMMessageDescriptionType)arg1;
|
||||||
- (void)_ovverrideGUIDForTest:(id)arg1;
|
- (void)_ovverrideGUIDForTest:(id)arg1;
|
||||||
@property(readonly, nonatomic) BOOL isAssociatedMessage;
|
@property(readonly, nonatomic) BOOL isAssociatedMessage;
|
||||||
- (id)initWithSender:(id)arg1 time:(id)arg2 text:(id)arg3 messageSubject:(id)arg4 fileTransferGUIDs:(id)arg5 flags:(unsigned long long)arg6 error:(id)arg7 guid:(id)arg8 subject:(id)arg9 associatedMessageGUID:(id)arg10 associatedMessageType:(long long)arg11 associatedMessageRange:(struct _NSRange)arg12 associatedMessageInfo:(id)arg13;
|
- (id)initWithSender:(id)arg1 time:(id)arg2 text:(id)arg3 messageSubject:(id)arg4 fileTransferGUIDs:(id)arg5 flags:(unsigned long long)arg6 error:(id)arg7 guid:(id)arg8 subject:(id)arg9 associatedMessageGUID:(id)arg10 associatedMessageType:(long long)arg11 associatedMessageRange:(struct _NSRange)arg12 associatedMessageInfo:(id)arg13;
|
||||||
@@ -4080,6 +4161,30 @@ __attribute__((visibility("default"))) @interface IMService : NSObject { }
|
|||||||
@property(readonly) unsigned long long hash;
|
@property(readonly) unsigned long long hash;
|
||||||
@property(readonly) Class superclass;
|
@property(readonly) Class superclass;
|
||||||
|
|
||||||
|
- (IMChat *)chatWithHandle:(IMHandle *)handle;
|
||||||
|
- (IMChat *)chatWithHandle:(IMHandle *)handle lastAddressedHandle:( NSString *)lastAddressedHandle lastAddressedSIMID:( NSString *)lastAddressedSIMID;
|
||||||
|
- (IMChat *)chatWithHandles:(NSArray<IMHandle *> *)handles;
|
||||||
|
- (IMChat *)chatWithHandles:(NSArray<IMHandle *> *)handles lastAddressedHandle:( NSString *)lastAddressedHandle lastAddressedSIMID:( NSString *)lastAddressedSIMID;
|
||||||
|
- (IMChat *)chatWithHandles:(NSArray<IMHandle *> *)handles displayName:( NSString *)displayName joinedChatsOnly:(BOOL)joinedChatsOnly;
|
||||||
|
- (IMChat *)chatWithHandles:(NSArray<IMHandle *> *)handles displayName:( NSString *)displayName joinedChatsOnly:(BOOL)joinedChatsOnly lastAddressedHandle:( NSString *)lastAddressedHandle lastAddressedSIMID:( NSString *)lastAddressedSIMID;
|
||||||
|
|
||||||
|
- (NSArray<NSString *> *)allGUIDsForChat:(IMChat *)chat;
|
||||||
|
- ( IMChat *)existingChatWithHandle:(IMHandle *)handle;
|
||||||
|
- ( IMChat *)existingChatWithHandle:(IMHandle *)handle allowAlternativeService:(BOOL)allowAlternativeService;
|
||||||
|
- ( IMChat *)existingChatWithHandles:(NSArray<IMHandle *> *)handles;
|
||||||
|
- ( IMChat *)existingChatWithHandles:(NSArray<IMHandle *> *)handles allowAlternativeService:(BOOL)allowAlternativeService;
|
||||||
|
- ( IMChat *)existingChatWithHandles:(NSArray<IMHandle *> *)handles allowAlternativeService:(BOOL)allowAlternativeService groupID:(NSString *)groupID;
|
||||||
|
- ( IMChat *)existingChatWithHandles:(NSArray *)handles allowAlternativeService:(BOOL)allowAlternativeService groupID:( NSString *)groupID displayName:( NSString *)displayName joinedChatsOnly:(BOOL)joinedChatsOnly;
|
||||||
|
// - ( IMChat *)existingChatWithGUID:(NSString *)guid;
|
||||||
|
- ( IMChat *)existingChatWithPinningIdentifier:(NSString *)pinningIdentifier;
|
||||||
|
- ( IMChat *)existingChatWithDeviceIndependentID:(NSString *)deviceIndependentID;
|
||||||
|
// - ( IMChat *)existingChatWithChatIdentifier:(NSString *)identifier;
|
||||||
|
- ( IMChat *)existingChatWithPersonID:(NSString *)personID;
|
||||||
|
// - ( IMChat *)existingChatWithGroupID:(NSString *)groupID;
|
||||||
|
// - ( IMChat *)existingChatWithDisplayName:(NSString *)displayName;
|
||||||
|
- ( IMChat *)existingChatWithAddresses:(NSArray<NSString *> *)addresses allowAlternativeService:(BOOL)allowAlternativeService bestHandles:(NSArray<IMHandle *> * __autoreleasing*)outBestHandles;
|
||||||
|
- ( IMChat *)existingChatWithContacts:(NSSet /* <CNContact *> */ *)contacts bestHandles:(NSArray<IMHandle *> * __autoreleasing * )outBestHandles;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface IMSimulatedChat : IMChat // <IMSimulatedChatDelegate, IMSimulatedDaemonListener>
|
@interface IMSimulatedChat : IMChat // <IMSimulatedChatDelegate, IMSimulatedDaemonListener>
|
||||||
@@ -4975,3 +5080,66 @@ __attribute__((visibility("default"))) @interface IMService : NSObject { }
|
|||||||
- (struct __CFArray *)copyDDResultArrayByScanningStringForURLs;
|
- (struct __CFArray *)copyDDResultArrayByScanningStringForURLs;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
typedef NS_ENUM(NSInteger, FZIDType) {
|
||||||
|
FZUnknownIDType = -1,
|
||||||
|
FZPhoneNumberBasedID = 0,
|
||||||
|
FZEmailBasedID = 1,
|
||||||
|
FZDSBasedID = 2,
|
||||||
|
FZBusinessBasedID = 3,
|
||||||
|
FZTemporaryBasedID = 4,
|
||||||
|
FZPseudonymBasedID = 5,
|
||||||
|
FZHardwareBasedID = 6,
|
||||||
|
FZSIPBasedID = 7,
|
||||||
|
};
|
||||||
|
|
||||||
|
@interface NSString (FezAdditions)
|
||||||
|
|
||||||
|
- (FZIDType) _FZIDType;
|
||||||
|
- (FZIDType) _FZBestGuessFZIDType;
|
||||||
|
|
||||||
|
- (NSString *) _IDFromFZIDType:(FZIDType)IDType;
|
||||||
|
- (NSString *) _stripFZIDPrefix;
|
||||||
|
|
||||||
|
- (NSString *) _URIFromFZIDType:(FZIDType)IDType;
|
||||||
|
- (NSString *) _bestGuessURI;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
extern BOOL IMStringIsEmail( NSString * string );
|
||||||
|
extern BOOL IMStringIsPhoneNumber( NSString * string );
|
||||||
|
extern BOOL IMStringIsBusinessID( NSString * string );
|
||||||
|
extern BOOL IMStringIsTemporaryID( NSString * string );
|
||||||
|
extern BOOL IMStringIsPseudonymID( NSString * string );
|
||||||
|
extern BOOL IMStringIsHardwareID( NSString * string );
|
||||||
|
extern BOOL IMStringIsSIPID( NSString * string );
|
||||||
|
|
||||||
|
enum {
|
||||||
|
IMChatServiceForSendingAvailabilityErrorNone = 0,
|
||||||
|
IMChatServiceForSendingAvailabilityErrorTooManyRecipients = 1,
|
||||||
|
IMChatServiceForSendingAvailabilityErrorIMessageRequired = 2,
|
||||||
|
IMChatServiceForSendingAvailabilityErrorMMSRequired = 3,
|
||||||
|
IMChatServiceForSendingAvailabilityErrorNoAvailableServices = 4,
|
||||||
|
IMChatServiceForSendingAvailabilityErrorSpamFiltered = 5,
|
||||||
|
};
|
||||||
|
typedef int8_t IMChatServiceForSendingAvailabilityError;
|
||||||
|
|
||||||
|
extern void IMChatCalculateServiceForSendingNewComposeMaybeForce(NSArray<NSString *> *canonicalIDSAddresses,
|
||||||
|
NSString* _Nullable senderLastAddressedHandle,
|
||||||
|
NSString* _Nullable senderLastAddressedSIMID,
|
||||||
|
BOOL forceMMS,
|
||||||
|
BOOL hasEmailRecipients,
|
||||||
|
BOOL lastSentMessageWasNotDelivered,
|
||||||
|
BOOL conversationWasDowngraded,
|
||||||
|
BOOL hasConversationHistory,
|
||||||
|
IMService * _Nullable previousService,
|
||||||
|
void(^ _Nonnull completion)(BOOL allAddressesiMessageCapable,
|
||||||
|
NSDictionary * _Nullable perRecipientAvailability,
|
||||||
|
BOOL checkedServer,
|
||||||
|
IMChatServiceForSendingAvailabilityError error));
|
||||||
|
|
||||||
|
extern NSString *IMCopyIDForPhoneNumber(NSString *phoneNumber, NSString *_Nullable countryCode, BOOL useNetworkCountryCode) NS_RETURNS_RETAINED;
|
||||||
|
extern NSString *IMCopyIDForEmailAddress(NSString *emailAddress) NS_RETURNS_RETAINED;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1704,3 +1704,4 @@ extern NSURL* IMAttachmentPreviewFileURL(NSURL *attachmentURL, NSString *extensi
|
|||||||
- (id)initWithSerializedError_im:(struct NSDictionary *)arg1;
|
- (id)initWithSerializedError_im:(struct NSDictionary *)arg1;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
extern NSString *IMAssociatedMessageDecodeGUID(NSString* guid);
|
||||||
|
|||||||
1
Makefile
1
Makefile
@@ -1,5 +1,6 @@
|
|||||||
INSTALL_PATH := /usr/share/kordophone
|
INSTALL_PATH := /usr/share/kordophone
|
||||||
|
|
||||||
|
.PHONY: build/Release/kordophoned
|
||||||
build/Release/kordophoned:
|
build/Release/kordophoned:
|
||||||
xcodebuild
|
xcodebuild
|
||||||
|
|
||||||
|
|||||||
@@ -14,59 +14,32 @@
|
|||||||
1AA43E95219EC38E00EDF1A7 /* MBIMHTTPUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AA43E94219EC38E00EDF1A7 /* MBIMHTTPUtilities.m */; };
|
1AA43E95219EC38E00EDF1A7 /* MBIMHTTPUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AA43E94219EC38E00EDF1A7 /* MBIMHTTPUtilities.m */; };
|
||||||
1AAB32B121F82EB7004A2A72 /* MBIMLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AAB32B021F82EB7004A2A72 /* MBIMLogging.m */; };
|
1AAB32B121F82EB7004A2A72 /* MBIMLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AAB32B021F82EB7004A2A72 /* MBIMLogging.m */; };
|
||||||
1AAB32B421F837BB004A2A72 /* hookAgent.sh in CopyFiles */ = {isa = PBXBuildFile; fileRef = CD83E1B5219BF78E00F4CCEA /* hookAgent.sh */; };
|
1AAB32B421F837BB004A2A72 /* hookAgent.sh in CopyFiles */ = {isa = PBXBuildFile; fileRef = CD83E1B5219BF78E00F4CCEA /* hookAgent.sh */; };
|
||||||
1ACFCF2A219EB2AC00E2C237 /* HTTPConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE00219EB2AB00E2C237 /* HTTPConnection.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF2B219EB2AC00E2C237 /* HTTPLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE01219EB2AB00E2C237 /* HTTPLogging.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF2C219EB2AC00E2C237 /* HTTPMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE02219EB2AB00E2C237 /* HTTPMessage.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF2D219EB2AC00E2C237 /* WebSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE03219EB2AB00E2C237 /* WebSocket.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF2E219EB2AC00E2C237 /* HTTPAuthenticationRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE04219EB2AB00E2C237 /* HTTPAuthenticationRequest.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF2F219EB2AC00E2C237 /* HTTPAsyncFileResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE06219EB2AB00E2C237 /* HTTPAsyncFileResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF30219EB2AC00E2C237 /* HTTPErrorResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE07219EB2AB00E2C237 /* HTTPErrorResponse.m */; };
|
1ACFCF30219EB2AC00E2C237 /* HTTPErrorResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE07219EB2AB00E2C237 /* HTTPErrorResponse.m */; };
|
||||||
1ACFCF31219EB2AC00E2C237 /* HTTPDataResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE08219EB2AB00E2C237 /* HTTPDataResponse.m */; };
|
1ACFCF31219EB2AC00E2C237 /* HTTPDataResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE08219EB2AB00E2C237 /* HTTPDataResponse.m */; };
|
||||||
1ACFCF32219EB2AC00E2C237 /* HTTPRedirectResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE09219EB2AB00E2C237 /* HTTPRedirectResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF33219EB2AC00E2C237 /* HTTPDynamicFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE0A219EB2AB00E2C237 /* HTTPDynamicFileResponse.m */; };
|
1ACFCF33219EB2AC00E2C237 /* HTTPDynamicFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE0A219EB2AB00E2C237 /* HTTPDynamicFileResponse.m */; };
|
||||||
1ACFCF34219EB2AC00E2C237 /* HTTPFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE0B219EB2AB00E2C237 /* HTTPFileResponse.m */; };
|
1ACFCF34219EB2AC00E2C237 /* HTTPFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE0B219EB2AB00E2C237 /* HTTPFileResponse.m */; };
|
||||||
1ACFCF35219EB2AC00E2C237 /* HTTPAsyncFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE0C219EB2AB00E2C237 /* HTTPAsyncFileResponse.m */; };
|
1ACFCF35219EB2AC00E2C237 /* HTTPAsyncFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE0C219EB2AB00E2C237 /* HTTPAsyncFileResponse.m */; };
|
||||||
1ACFCF36219EB2AC00E2C237 /* HTTPRedirectResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE0D219EB2AB00E2C237 /* HTTPRedirectResponse.m */; };
|
1ACFCF36219EB2AC00E2C237 /* HTTPRedirectResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE0D219EB2AB00E2C237 /* HTTPRedirectResponse.m */; };
|
||||||
1ACFCF37219EB2AC00E2C237 /* HTTPDataResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE0E219EB2AB00E2C237 /* HTTPDataResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF38219EB2AC00E2C237 /* HTTPErrorResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE0F219EB2AB00E2C237 /* HTTPErrorResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF39219EB2AC00E2C237 /* HTTPFileResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE10219EB2AB00E2C237 /* HTTPFileResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF3A219EB2AC00E2C237 /* HTTPDynamicFileResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE11219EB2AB00E2C237 /* HTTPDynamicFileResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF3B219EB2AC00E2C237 /* HTTPServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE12219EB2AB00E2C237 /* HTTPServer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF3C219EB2AC00E2C237 /* HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE13219EB2AB00E2C237 /* HTTPMessage.m */; };
|
1ACFCF3C219EB2AC00E2C237 /* HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE13219EB2AB00E2C237 /* HTTPMessage.m */; };
|
||||||
1ACFCF3D219EB2AC00E2C237 /* HTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE14219EB2AB00E2C237 /* HTTPConnection.m */; };
|
1ACFCF3D219EB2AC00E2C237 /* HTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE14219EB2AB00E2C237 /* HTTPConnection.m */; };
|
||||||
1ACFCF3E219EB2AC00E2C237 /* WebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE15219EB2AB00E2C237 /* WebSocket.m */; };
|
1ACFCF3E219EB2AC00E2C237 /* WebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE15219EB2AB00E2C237 /* WebSocket.m */; };
|
||||||
1ACFCF3F219EB2AC00E2C237 /* HTTPResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE16219EB2AB00E2C237 /* HTTPResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF40219EB2AC00E2C237 /* MultipartFormDataParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE18219EB2AB00E2C237 /* MultipartFormDataParser.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF41219EB2AC00E2C237 /* MultipartMessageHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE19219EB2AB00E2C237 /* MultipartMessageHeader.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF42219EB2AC00E2C237 /* MultipartMessageHeaderField.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE1A219EB2AB00E2C237 /* MultipartMessageHeaderField.m */; };
|
1ACFCF42219EB2AC00E2C237 /* MultipartMessageHeaderField.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE1A219EB2AB00E2C237 /* MultipartMessageHeaderField.m */; };
|
||||||
1ACFCF43219EB2AC00E2C237 /* MultipartFormDataParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE1B219EB2AB00E2C237 /* MultipartFormDataParser.m */; };
|
1ACFCF43219EB2AC00E2C237 /* MultipartFormDataParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE1B219EB2AB00E2C237 /* MultipartFormDataParser.m */; };
|
||||||
1ACFCF44219EB2AC00E2C237 /* MultipartMessageHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE1C219EB2AB00E2C237 /* MultipartMessageHeader.m */; };
|
1ACFCF44219EB2AC00E2C237 /* MultipartMessageHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE1C219EB2AB00E2C237 /* MultipartMessageHeader.m */; };
|
||||||
1ACFCF45219EB2AC00E2C237 /* MultipartMessageHeaderField.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE1D219EB2AB00E2C237 /* MultipartMessageHeaderField.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF46219EB2AC00E2C237 /* HTTPAuthenticationRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE1E219EB2AB00E2C237 /* HTTPAuthenticationRequest.m */; };
|
1ACFCF46219EB2AC00E2C237 /* HTTPAuthenticationRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE1E219EB2AB00E2C237 /* HTTPAuthenticationRequest.m */; };
|
||||||
1ACFCF47219EB2AC00E2C237 /* DDNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE20219EB2AB00E2C237 /* DDNumber.m */; };
|
1ACFCF47219EB2AC00E2C237 /* DDNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE20219EB2AB00E2C237 /* DDNumber.m */; };
|
||||||
1ACFCF48219EB2AC00E2C237 /* DDData.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE21219EB2AB00E2C237 /* DDData.m */; };
|
1ACFCF48219EB2AC00E2C237 /* DDData.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE21219EB2AB00E2C237 /* DDData.m */; };
|
||||||
1ACFCF49219EB2AC00E2C237 /* DDRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE22219EB2AB00E2C237 /* DDRange.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF4A219EB2AC00E2C237 /* DDNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE23219EB2AB00E2C237 /* DDNumber.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF4B219EB2AC00E2C237 /* DDRange.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE24219EB2AB00E2C237 /* DDRange.m */; };
|
1ACFCF4B219EB2AC00E2C237 /* DDRange.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE24219EB2AB00E2C237 /* DDRange.m */; };
|
||||||
1ACFCF4C219EB2AC00E2C237 /* DDData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCE25219EB2AB00E2C237 /* DDData.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCF4D219EB2AC00E2C237 /* HTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE26219EB2AB00E2C237 /* HTTPServer.m */; };
|
1ACFCF4D219EB2AC00E2C237 /* HTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCE26219EB2AB00E2C237 /* HTTPServer.m */; };
|
||||||
1ACFCFCA219EB2AC00E2C237 /* DDTTYLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCF09219EB2AC00E2C237 /* DDTTYLogger.m */; };
|
1ACFCFCA219EB2AC00E2C237 /* DDTTYLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCF09219EB2AC00E2C237 /* DDTTYLogger.m */; };
|
||||||
1ACFCFCB219EB2AC00E2C237 /* DDLog.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCF0A219EB2AC00E2C237 /* DDLog.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCFCC219EB2AC00E2C237 /* DDAbstractDatabaseLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCF0B219EB2AC00E2C237 /* DDAbstractDatabaseLogger.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCFCD219EB2AC00E2C237 /* DDASLLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCF0C219EB2AC00E2C237 /* DDASLLogger.m */; };
|
1ACFCFCD219EB2AC00E2C237 /* DDASLLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCF0C219EB2AC00E2C237 /* DDASLLogger.m */; };
|
||||||
1ACFCFCE219EB2AC00E2C237 /* DDFileLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCF0D219EB2AC00E2C237 /* DDFileLogger.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCFCF219EB2AC00E2C237 /* ContextFilterLogFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCF0F219EB2AC00E2C237 /* ContextFilterLogFormatter.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCFD0219EB2AC00E2C237 /* DispatchQueueLogFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCF10219EB2AC00E2C237 /* DispatchQueueLogFormatter.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCFD1219EB2AC00E2C237 /* ContextFilterLogFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCF11219EB2AC00E2C237 /* ContextFilterLogFormatter.m */; };
|
1ACFCFD1219EB2AC00E2C237 /* ContextFilterLogFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCF11219EB2AC00E2C237 /* ContextFilterLogFormatter.m */; };
|
||||||
1ACFCFD2219EB2AC00E2C237 /* DispatchQueueLogFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCF12219EB2AC00E2C237 /* DispatchQueueLogFormatter.m */; };
|
1ACFCFD2219EB2AC00E2C237 /* DispatchQueueLogFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCF12219EB2AC00E2C237 /* DispatchQueueLogFormatter.m */; };
|
||||||
1ACFCFD4219EB2AC00E2C237 /* DDLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCF14219EB2AC00E2C237 /* DDLog.m */; };
|
1ACFCFD4219EB2AC00E2C237 /* DDLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCF14219EB2AC00E2C237 /* DDLog.m */; };
|
||||||
1ACFCFD6219EB2AC00E2C237 /* DDTTYLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCF16219EB2AC00E2C237 /* DDTTYLogger.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCFD7219EB2AC00E2C237 /* DDAbstractDatabaseLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCF17219EB2AC00E2C237 /* DDAbstractDatabaseLogger.m */; };
|
1ACFCFD7219EB2AC00E2C237 /* DDAbstractDatabaseLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCF17219EB2AC00E2C237 /* DDAbstractDatabaseLogger.m */; };
|
||||||
1ACFCFD8219EB2AC00E2C237 /* DDFileLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCF18219EB2AC00E2C237 /* DDFileLogger.m */; };
|
1ACFCFD8219EB2AC00E2C237 /* DDFileLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCF18219EB2AC00E2C237 /* DDFileLogger.m */; };
|
||||||
1ACFCFD9219EB2AC00E2C237 /* DDASLLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCF19219EB2AC00E2C237 /* DDASLLogger.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
1ACFCFDA219EB2AC00E2C237 /* GCDAsyncSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCF1B219EB2AC00E2C237 /* GCDAsyncSocket.m */; };
|
1ACFCFDA219EB2AC00E2C237 /* GCDAsyncSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACFCF1B219EB2AC00E2C237 /* GCDAsyncSocket.m */; };
|
||||||
1ACFCFDC219EB2AC00E2C237 /* GCDAsyncSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACFCF1D219EB2AC00E2C237 /* GCDAsyncSocket.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
1ACFCFDF219EB31400E2C237 /* libCocoaHTTPServer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1ACFCDE2219EB28A00E2C237 /* libCocoaHTTPServer.a */; };
|
||||||
1ACFCFDF219EB31400E2C237 /* CocoaHTTPServer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1ACFCDE2219EB28A00E2C237 /* CocoaHTTPServer.framework */; };
|
|
||||||
1AD8936E21EFD986009B599A /* MBIMUploadAttachmentOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AD8936D21EFD986009B599A /* MBIMUploadAttachmentOperation.m */; };
|
1AD8936E21EFD986009B599A /* MBIMUploadAttachmentOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AD8936D21EFD986009B599A /* MBIMUploadAttachmentOperation.m */; };
|
||||||
CD14F18E219E2DB400E7DD22 /* CryptoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CD14F18D219E2DB400E7DD22 /* CryptoTests.m */; };
|
CD14F18E219E2DB400E7DD22 /* CryptoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CD14F18D219E2DB400E7DD22 /* CryptoTests.m */; };
|
||||||
CD14F1A1219FE7D600E7DD22 /* MBIMUpdatePollOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CD14F1A0219FE7D600E7DD22 /* MBIMUpdatePollOperation.m */; };
|
CD14F1A1219FE7D600E7DD22 /* MBIMUpdatePollOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CD14F1A0219FE7D600E7DD22 /* MBIMUpdatePollOperation.m */; };
|
||||||
@@ -79,6 +52,7 @@
|
|||||||
CD2783002952876700C0C030 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD2782FF2952876700C0C030 /* ImageIO.framework */; };
|
CD2783002952876700C0C030 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD2782FF2952876700C0C030 /* ImageIO.framework */; };
|
||||||
CD2ECEC2269539100055E302 /* MBIMAuthenticateOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CD2ECEC1269539100055E302 /* MBIMAuthenticateOperation.m */; };
|
CD2ECEC2269539100055E302 /* MBIMAuthenticateOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CD2ECEC1269539100055E302 /* MBIMAuthenticateOperation.m */; };
|
||||||
CD2ECEC526953F2A0055E302 /* MBIMAuthToken.m in Sources */ = {isa = PBXBuildFile; fileRef = CD2ECEC426953F2A0055E302 /* MBIMAuthToken.m */; };
|
CD2ECEC526953F2A0055E302 /* MBIMAuthToken.m in Sources */ = {isa = PBXBuildFile; fileRef = CD2ECEC426953F2A0055E302 /* MBIMAuthToken.m */; };
|
||||||
|
CD3F62B1297769F2004305D9 /* MBIMURLUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = CD3F62B0297769F2004305D9 /* MBIMURLUtilities.m */; };
|
||||||
CD602056219B5DFD0024D9C5 /* MBIMBridgeOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CD602055219B5DFD0024D9C5 /* MBIMBridgeOperation.m */; };
|
CD602056219B5DFD0024D9C5 /* MBIMBridgeOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CD602055219B5DFD0024D9C5 /* MBIMBridgeOperation.m */; };
|
||||||
CD60205C219B623F0024D9C5 /* MBIMMessagesListOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CD60205B219B623F0024D9C5 /* MBIMMessagesListOperation.m */; };
|
CD60205C219B623F0024D9C5 /* MBIMMessagesListOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CD60205B219B623F0024D9C5 /* MBIMMessagesListOperation.m */; };
|
||||||
CD60205F219B674B0024D9C5 /* MBIMConversationListOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CD60205E219B674B0024D9C5 /* MBIMConversationListOperation.m */; };
|
CD60205F219B674B0024D9C5 /* MBIMConversationListOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CD60205E219B674B0024D9C5 /* MBIMConversationListOperation.m */; };
|
||||||
@@ -88,11 +62,13 @@
|
|||||||
CD936A32289B353F0093A1AC /* MBIMErrorResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = CD936A31289B353F0093A1AC /* MBIMErrorResponse.m */; };
|
CD936A32289B353F0093A1AC /* MBIMErrorResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = CD936A31289B353F0093A1AC /* MBIMErrorResponse.m */; };
|
||||||
CD936A35289B47D60093A1AC /* MBIMVersionOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CD936A34289B47D50093A1AC /* MBIMVersionOperation.m */; };
|
CD936A35289B47D60093A1AC /* MBIMVersionOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CD936A34289B47D50093A1AC /* MBIMVersionOperation.m */; };
|
||||||
CD936A39289B49FC0093A1AC /* MBIMStatusOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CD936A38289B49FC0093A1AC /* MBIMStatusOperation.m */; };
|
CD936A39289B49FC0093A1AC /* MBIMStatusOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CD936A38289B49FC0093A1AC /* MBIMStatusOperation.m */; };
|
||||||
|
CDA64B472DFCBF3000E9B07E /* MBIMPingPongWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = CDA64B462DFCBF3000E9B07E /* MBIMPingPongWebSocket.m */; };
|
||||||
CDDCF78D283F398C0087ABDF /* MBIMDeleteConversationOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CDDCF78C283F398C0087ABDF /* MBIMDeleteConversationOperation.m */; };
|
CDDCF78D283F398C0087ABDF /* MBIMDeleteConversationOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CDDCF78C283F398C0087ABDF /* MBIMDeleteConversationOperation.m */; };
|
||||||
CDE4556421A3578A0041F5DD /* IMChat+Encoded.m in Sources */ = {isa = PBXBuildFile; fileRef = CDE4556321A3578A0041F5DD /* IMChat+Encoded.m */; };
|
CDE4556421A3578A0041F5DD /* IMChat+Encoded.m in Sources */ = {isa = PBXBuildFile; fileRef = CDE4556321A3578A0041F5DD /* IMChat+Encoded.m */; };
|
||||||
CDE455A121A365AD0041F5DD /* MBIMMarkOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CDE455A021A365AD0041F5DD /* MBIMMarkOperation.m */; };
|
CDE455A121A365AD0041F5DD /* MBIMMarkOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CDE455A021A365AD0041F5DD /* MBIMMarkOperation.m */; };
|
||||||
CDE455A421A5308D0041F5DD /* MBIMFetchAttachmentOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CDE455A321A5308D0041F5DD /* MBIMFetchAttachmentOperation.m */; };
|
CDE455A421A5308D0041F5DD /* MBIMFetchAttachmentOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CDE455A321A5308D0041F5DD /* MBIMFetchAttachmentOperation.m */; };
|
||||||
CDE455A721A531ED0041F5DD /* MBIMDataResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = CDE455A621A531ED0041F5DD /* MBIMDataResponse.m */; };
|
CDE455A721A531ED0041F5DD /* MBIMDataResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = CDE455A621A531ED0041F5DD /* MBIMDataResponse.m */; };
|
||||||
|
CDEFF9FE2CACC7A700063C52 /* MBIMResolveHandleOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = CDEFF9FD2CACC7A700063C52 /* MBIMResolveHandleOperation.m */; };
|
||||||
CDF62335219A895D00690038 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CDF62334219A895D00690038 /* main.m */; };
|
CDF62335219A895D00690038 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CDF62334219A895D00690038 /* main.m */; };
|
||||||
CDF62339219A8A5600690038 /* MBIMBridge.h in Sources */ = {isa = PBXBuildFile; fileRef = 1A0C4469219A4BC300F2AC00 /* MBIMBridge.h */; };
|
CDF62339219A8A5600690038 /* MBIMBridge.h in Sources */ = {isa = PBXBuildFile; fileRef = 1A0C4469219A4BC300F2AC00 /* MBIMBridge.h */; };
|
||||||
CDF6233A219A8A5600690038 /* MBIMBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A0C446A219A4BC300F2AC00 /* MBIMBridge.m */; };
|
CDF6233A219A8A5600690038 /* MBIMBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A0C446A219A4BC300F2AC00 /* MBIMBridge.m */; };
|
||||||
@@ -154,7 +130,7 @@
|
|||||||
1AAB32AF21F82EB7004A2A72 /* MBIMLogging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBIMLogging.h; sourceTree = "<group>"; };
|
1AAB32AF21F82EB7004A2A72 /* MBIMLogging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBIMLogging.h; sourceTree = "<group>"; };
|
||||||
1AAB32B021F82EB7004A2A72 /* MBIMLogging.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMLogging.m; sourceTree = "<group>"; };
|
1AAB32B021F82EB7004A2A72 /* MBIMLogging.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMLogging.m; sourceTree = "<group>"; };
|
||||||
1AAB32B221F835BD004A2A72 /* KPServer.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KPServer.pch; sourceTree = "<group>"; };
|
1AAB32B221F835BD004A2A72 /* KPServer.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KPServer.pch; sourceTree = "<group>"; };
|
||||||
1ACFCDE2219EB28A00E2C237 /* CocoaHTTPServer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CocoaHTTPServer.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
1ACFCDE2219EB28A00E2C237 /* libCocoaHTTPServer.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCocoaHTTPServer.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
1ACFCDFC219EB2AB00E2C237 /* LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.txt; sourceTree = "<group>"; };
|
1ACFCDFC219EB2AB00E2C237 /* LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.txt; sourceTree = "<group>"; };
|
||||||
1ACFCDFE219EB2AB00E2C237 /* README.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.markdown; sourceTree = "<group>"; };
|
1ACFCDFE219EB2AB00E2C237 /* README.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.markdown; sourceTree = "<group>"; };
|
||||||
1ACFCE00219EB2AB00E2C237 /* HTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPConnection.h; sourceTree = "<group>"; };
|
1ACFCE00219EB2AB00E2C237 /* HTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPConnection.h; sourceTree = "<group>"; };
|
||||||
@@ -236,6 +212,8 @@
|
|||||||
CD2ECEC1269539100055E302 /* MBIMAuthenticateOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMAuthenticateOperation.m; sourceTree = "<group>"; };
|
CD2ECEC1269539100055E302 /* MBIMAuthenticateOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMAuthenticateOperation.m; sourceTree = "<group>"; };
|
||||||
CD2ECEC326953F2A0055E302 /* MBIMAuthToken.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBIMAuthToken.h; sourceTree = "<group>"; };
|
CD2ECEC326953F2A0055E302 /* MBIMAuthToken.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBIMAuthToken.h; sourceTree = "<group>"; };
|
||||||
CD2ECEC426953F2A0055E302 /* MBIMAuthToken.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMAuthToken.m; sourceTree = "<group>"; };
|
CD2ECEC426953F2A0055E302 /* MBIMAuthToken.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMAuthToken.m; sourceTree = "<group>"; };
|
||||||
|
CD3F62AF297769F2004305D9 /* MBIMURLUtilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBIMURLUtilities.h; sourceTree = "<group>"; };
|
||||||
|
CD3F62B0297769F2004305D9 /* MBIMURLUtilities.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMURLUtilities.m; sourceTree = "<group>"; };
|
||||||
CD602054219B5DFD0024D9C5 /* MBIMBridgeOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBIMBridgeOperation.h; sourceTree = "<group>"; };
|
CD602054219B5DFD0024D9C5 /* MBIMBridgeOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBIMBridgeOperation.h; sourceTree = "<group>"; };
|
||||||
CD602055219B5DFD0024D9C5 /* MBIMBridgeOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMBridgeOperation.m; sourceTree = "<group>"; };
|
CD602055219B5DFD0024D9C5 /* MBIMBridgeOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMBridgeOperation.m; sourceTree = "<group>"; };
|
||||||
CD60205A219B623F0024D9C5 /* MBIMMessagesListOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBIMMessagesListOperation.h; sourceTree = "<group>"; };
|
CD60205A219B623F0024D9C5 /* MBIMMessagesListOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBIMMessagesListOperation.h; sourceTree = "<group>"; };
|
||||||
@@ -256,6 +234,8 @@
|
|||||||
CD936A34289B47D50093A1AC /* MBIMVersionOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMVersionOperation.m; sourceTree = "<group>"; };
|
CD936A34289B47D50093A1AC /* MBIMVersionOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMVersionOperation.m; sourceTree = "<group>"; };
|
||||||
CD936A37289B49FC0093A1AC /* MBIMStatusOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBIMStatusOperation.h; sourceTree = "<group>"; };
|
CD936A37289B49FC0093A1AC /* MBIMStatusOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBIMStatusOperation.h; sourceTree = "<group>"; };
|
||||||
CD936A38289B49FC0093A1AC /* MBIMStatusOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMStatusOperation.m; sourceTree = "<group>"; };
|
CD936A38289B49FC0093A1AC /* MBIMStatusOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMStatusOperation.m; sourceTree = "<group>"; };
|
||||||
|
CDA64B452DFCBF3000E9B07E /* MBIMPingPongWebSocket.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBIMPingPongWebSocket.h; sourceTree = "<group>"; };
|
||||||
|
CDA64B462DFCBF3000E9B07E /* MBIMPingPongWebSocket.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMPingPongWebSocket.m; sourceTree = "<group>"; };
|
||||||
CDDCF78B283F398C0087ABDF /* MBIMDeleteConversationOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBIMDeleteConversationOperation.h; sourceTree = "<group>"; };
|
CDDCF78B283F398C0087ABDF /* MBIMDeleteConversationOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBIMDeleteConversationOperation.h; sourceTree = "<group>"; };
|
||||||
CDDCF78C283F398C0087ABDF /* MBIMDeleteConversationOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMDeleteConversationOperation.m; sourceTree = "<group>"; };
|
CDDCF78C283F398C0087ABDF /* MBIMDeleteConversationOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMDeleteConversationOperation.m; sourceTree = "<group>"; };
|
||||||
CDE4556221A3578A0041F5DD /* IMChat+Encoded.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "IMChat+Encoded.h"; sourceTree = "<group>"; };
|
CDE4556221A3578A0041F5DD /* IMChat+Encoded.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "IMChat+Encoded.h"; sourceTree = "<group>"; };
|
||||||
@@ -266,6 +246,8 @@
|
|||||||
CDE455A321A5308D0041F5DD /* MBIMFetchAttachmentOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMFetchAttachmentOperation.m; sourceTree = "<group>"; };
|
CDE455A321A5308D0041F5DD /* MBIMFetchAttachmentOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMFetchAttachmentOperation.m; sourceTree = "<group>"; };
|
||||||
CDE455A521A531ED0041F5DD /* MBIMDataResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBIMDataResponse.h; sourceTree = "<group>"; };
|
CDE455A521A531ED0041F5DD /* MBIMDataResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBIMDataResponse.h; sourceTree = "<group>"; };
|
||||||
CDE455A621A531ED0041F5DD /* MBIMDataResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMDataResponse.m; sourceTree = "<group>"; };
|
CDE455A621A531ED0041F5DD /* MBIMDataResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMDataResponse.m; sourceTree = "<group>"; };
|
||||||
|
CDEFF9FC2CACC7A700063C52 /* MBIMResolveHandleOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBIMResolveHandleOperation.h; sourceTree = "<group>"; };
|
||||||
|
CDEFF9FD2CACC7A700063C52 /* MBIMResolveHandleOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMResolveHandleOperation.m; sourceTree = "<group>"; };
|
||||||
CDF62332219A895D00690038 /* kordophoned */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = kordophoned; sourceTree = BUILT_PRODUCTS_DIR; };
|
CDF62332219A895D00690038 /* kordophoned */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = kordophoned; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
CDF62334219A895D00690038 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
CDF62334219A895D00690038 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
@@ -299,7 +281,7 @@
|
|||||||
CD2782BC29527FE500C0C030 /* IMSharedUtilities.framework in Frameworks */,
|
CD2782BC29527FE500C0C030 /* IMSharedUtilities.framework in Frameworks */,
|
||||||
1A257CCB23A8681200A4A2C8 /* Security.framework in Frameworks */,
|
1A257CCB23A8681200A4A2C8 /* Security.framework in Frameworks */,
|
||||||
CD2783002952876700C0C030 /* ImageIO.framework in Frameworks */,
|
CD2783002952876700C0C030 /* ImageIO.framework in Frameworks */,
|
||||||
1ACFCFDF219EB31400E2C237 /* CocoaHTTPServer.framework in Frameworks */,
|
1ACFCFDF219EB31400E2C237 /* libCocoaHTTPServer.a in Frameworks */,
|
||||||
CD2782FE2952875F00C0C030 /* CoreGraphics.framework in Frameworks */,
|
CD2782FE2952875F00C0C030 /* CoreGraphics.framework in Frameworks */,
|
||||||
1A257CC923A867EF00A4A2C8 /* IMCore.framework in Frameworks */,
|
1A257CC923A867EF00A4A2C8 /* IMCore.framework in Frameworks */,
|
||||||
);
|
);
|
||||||
@@ -328,7 +310,7 @@
|
|||||||
CDF62332219A895D00690038 /* kordophoned */,
|
CDF62332219A895D00690038 /* kordophoned */,
|
||||||
CD83E161219BE91500F4CCEA /* libagentHook.dylib */,
|
CD83E161219BE91500F4CCEA /* libagentHook.dylib */,
|
||||||
CD14F18B219E2DB400E7DD22 /* Tests.xctest */,
|
CD14F18B219E2DB400E7DD22 /* Tests.xctest */,
|
||||||
1ACFCDE2219EB28A00E2C237 /* CocoaHTTPServer.framework */,
|
1ACFCDE2219EB28A00E2C237 /* libCocoaHTTPServer.a */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -370,6 +352,8 @@
|
|||||||
CD14F1AC219FFAE100E7DD22 /* MBIMConcurrentHTTPServer.m */,
|
CD14F1AC219FFAE100E7DD22 /* MBIMConcurrentHTTPServer.m */,
|
||||||
1ACFCFE2219EB45300E2C237 /* MBIMHTTPConnection.h */,
|
1ACFCFE2219EB45300E2C237 /* MBIMHTTPConnection.h */,
|
||||||
1ACFCFE3219EB45300E2C237 /* MBIMHTTPConnection.m */,
|
1ACFCFE3219EB45300E2C237 /* MBIMHTTPConnection.m */,
|
||||||
|
CDA64B452DFCBF3000E9B07E /* MBIMPingPongWebSocket.h */,
|
||||||
|
CDA64B462DFCBF3000E9B07E /* MBIMPingPongWebSocket.m */,
|
||||||
);
|
);
|
||||||
path = Bridge;
|
path = Bridge;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -387,6 +371,8 @@
|
|||||||
1AA43E94219EC38E00EDF1A7 /* MBIMHTTPUtilities.m */,
|
1AA43E94219EC38E00EDF1A7 /* MBIMHTTPUtilities.m */,
|
||||||
CD2782BD2952832B00C0C030 /* MBIMImageUtils.h */,
|
CD2782BD2952832B00C0C030 /* MBIMImageUtils.h */,
|
||||||
CD2782BE2952832B00C0C030 /* MBIMImageUtils.m */,
|
CD2782BE2952832B00C0C030 /* MBIMImageUtils.m */,
|
||||||
|
CD3F62AF297769F2004305D9 /* MBIMURLUtilities.h */,
|
||||||
|
CD3F62B0297769F2004305D9 /* MBIMURLUtilities.m */,
|
||||||
);
|
);
|
||||||
path = Utilities;
|
path = Utilities;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -566,6 +552,8 @@
|
|||||||
CDE455A021A365AD0041F5DD /* MBIMMarkOperation.m */,
|
CDE455A021A365AD0041F5DD /* MBIMMarkOperation.m */,
|
||||||
CD60205A219B623F0024D9C5 /* MBIMMessagesListOperation.h */,
|
CD60205A219B623F0024D9C5 /* MBIMMessagesListOperation.h */,
|
||||||
CD60205B219B623F0024D9C5 /* MBIMMessagesListOperation.m */,
|
CD60205B219B623F0024D9C5 /* MBIMMessagesListOperation.m */,
|
||||||
|
CDEFF9FC2CACC7A700063C52 /* MBIMResolveHandleOperation.h */,
|
||||||
|
CDEFF9FD2CACC7A700063C52 /* MBIMResolveHandleOperation.m */,
|
||||||
CD602060219B68950024D9C5 /* MBIMSendMessageOperation.h */,
|
CD602060219B68950024D9C5 /* MBIMSendMessageOperation.h */,
|
||||||
CD602061219B68950024D9C5 /* MBIMSendMessageOperation.m */,
|
CD602061219B68950024D9C5 /* MBIMSendMessageOperation.m */,
|
||||||
CD936A37289B49FC0093A1AC /* MBIMStatusOperation.h */,
|
CD936A37289B49FC0093A1AC /* MBIMStatusOperation.h */,
|
||||||
@@ -615,40 +603,6 @@
|
|||||||
/* End PBXGroup section */
|
/* End PBXGroup section */
|
||||||
|
|
||||||
/* Begin PBXHeadersBuildPhase section */
|
/* Begin PBXHeadersBuildPhase section */
|
||||||
1ACFCDDF219EB28A00E2C237 /* Headers */ = {
|
|
||||||
isa = PBXHeadersBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
1ACFCFCB219EB2AC00E2C237 /* DDLog.h in Headers */,
|
|
||||||
1ACFCF40219EB2AC00E2C237 /* MultipartFormDataParser.h in Headers */,
|
|
||||||
1ACFCF2F219EB2AC00E2C237 /* HTTPAsyncFileResponse.h in Headers */,
|
|
||||||
1ACFCF37219EB2AC00E2C237 /* HTTPDataResponse.h in Headers */,
|
|
||||||
1ACFCF45219EB2AC00E2C237 /* MultipartMessageHeaderField.h in Headers */,
|
|
||||||
1ACFCF3A219EB2AC00E2C237 /* HTTPDynamicFileResponse.h in Headers */,
|
|
||||||
1ACFCFCC219EB2AC00E2C237 /* DDAbstractDatabaseLogger.h in Headers */,
|
|
||||||
1ACFCFD6219EB2AC00E2C237 /* DDTTYLogger.h in Headers */,
|
|
||||||
1ACFCF4C219EB2AC00E2C237 /* DDData.h in Headers */,
|
|
||||||
1ACFCF2D219EB2AC00E2C237 /* WebSocket.h in Headers */,
|
|
||||||
1ACFCF49219EB2AC00E2C237 /* DDRange.h in Headers */,
|
|
||||||
1ACFCF32219EB2AC00E2C237 /* HTTPRedirectResponse.h in Headers */,
|
|
||||||
1ACFCF2E219EB2AC00E2C237 /* HTTPAuthenticationRequest.h in Headers */,
|
|
||||||
1ACFCFDC219EB2AC00E2C237 /* GCDAsyncSocket.h in Headers */,
|
|
||||||
1ACFCF4A219EB2AC00E2C237 /* DDNumber.h in Headers */,
|
|
||||||
1ACFCF3F219EB2AC00E2C237 /* HTTPResponse.h in Headers */,
|
|
||||||
1ACFCF39219EB2AC00E2C237 /* HTTPFileResponse.h in Headers */,
|
|
||||||
1ACFCFCF219EB2AC00E2C237 /* ContextFilterLogFormatter.h in Headers */,
|
|
||||||
1ACFCF3B219EB2AC00E2C237 /* HTTPServer.h in Headers */,
|
|
||||||
1ACFCF41219EB2AC00E2C237 /* MultipartMessageHeader.h in Headers */,
|
|
||||||
1ACFCF38219EB2AC00E2C237 /* HTTPErrorResponse.h in Headers */,
|
|
||||||
1ACFCF2B219EB2AC00E2C237 /* HTTPLogging.h in Headers */,
|
|
||||||
1ACFCFD0219EB2AC00E2C237 /* DispatchQueueLogFormatter.h in Headers */,
|
|
||||||
1ACFCF2C219EB2AC00E2C237 /* HTTPMessage.h in Headers */,
|
|
||||||
1ACFCFD9219EB2AC00E2C237 /* DDASLLogger.h in Headers */,
|
|
||||||
1ACFCFCE219EB2AC00E2C237 /* DDFileLogger.h in Headers */,
|
|
||||||
1ACFCF2A219EB2AC00E2C237 /* HTTPConnection.h in Headers */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
CD83E15D219BE91500F4CCEA /* Headers */ = {
|
CD83E15D219BE91500F4CCEA /* Headers */ = {
|
||||||
isa = PBXHeadersBuildPhase;
|
isa = PBXHeadersBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
@@ -665,8 +619,6 @@
|
|||||||
buildPhases = (
|
buildPhases = (
|
||||||
1ACFCDDD219EB28A00E2C237 /* Sources */,
|
1ACFCDDD219EB28A00E2C237 /* Sources */,
|
||||||
1ACFCDDE219EB28A00E2C237 /* Frameworks */,
|
1ACFCDDE219EB28A00E2C237 /* Frameworks */,
|
||||||
1ACFCDDF219EB28A00E2C237 /* Headers */,
|
|
||||||
1ACFCDE0219EB28A00E2C237 /* Resources */,
|
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
@@ -674,8 +626,8 @@
|
|||||||
);
|
);
|
||||||
name = CocoaHTTPServer;
|
name = CocoaHTTPServer;
|
||||||
productName = CocoaHTTPServer;
|
productName = CocoaHTTPServer;
|
||||||
productReference = 1ACFCDE2219EB28A00E2C237 /* CocoaHTTPServer.framework */;
|
productReference = 1ACFCDE2219EB28A00E2C237 /* libCocoaHTTPServer.a */;
|
||||||
productType = "com.apple.product-type.framework";
|
productType = "com.apple.product-type.library.static";
|
||||||
};
|
};
|
||||||
CD14F18A219E2DB400E7DD22 /* Tests */ = {
|
CD14F18A219E2DB400E7DD22 /* Tests */ = {
|
||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
@@ -720,7 +672,6 @@
|
|||||||
CDF6232E219A895D00690038 /* Sources */,
|
CDF6232E219A895D00690038 /* Sources */,
|
||||||
CDF6232F219A895D00690038 /* Frameworks */,
|
CDF6232F219A895D00690038 /* Frameworks */,
|
||||||
CDF62330219A895D00690038 /* CopyFiles */,
|
CDF62330219A895D00690038 /* CopyFiles */,
|
||||||
1AAB32AD21F8245D004A2A72 /* Add current directory to rpath */,
|
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
@@ -778,13 +729,6 @@
|
|||||||
/* End PBXProject section */
|
/* End PBXProject section */
|
||||||
|
|
||||||
/* Begin PBXResourcesBuildPhase section */
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
1ACFCDE0219EB28A00E2C237 /* Resources */ = {
|
|
||||||
isa = PBXResourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
CD14F189219E2DB400E7DD22 /* Resources */ = {
|
CD14F189219E2DB400E7DD22 /* Resources */ = {
|
||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
@@ -795,24 +739,6 @@
|
|||||||
/* End PBXResourcesBuildPhase section */
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXShellScriptBuildPhase section */
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
1AAB32AD21F8245D004A2A72 /* Add current directory to rpath */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputFileListPaths = (
|
|
||||||
);
|
|
||||||
inputPaths = (
|
|
||||||
);
|
|
||||||
name = "Add current directory to rpath";
|
|
||||||
outputFileListPaths = (
|
|
||||||
);
|
|
||||||
outputPaths = (
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n\nRESULT=$(install_name_tool -delete_rpath $BUILT_PRODUCTS_DIR $BUILT_PRODUCTS_DIR/$EXECUTABLE_NAME 2> /dev/null)\n\ninstall_name_tool -add_rpath $BUILT_PRODUCTS_DIR $BUILT_PRODUCTS_DIR/$EXECUTABLE_NAME\n";
|
|
||||||
};
|
|
||||||
CD936A36289B48930093A1AC /* Compile Version String */ = {
|
CD936A36289B48930093A1AC /* Compile Version String */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
@@ -886,6 +812,7 @@
|
|||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
CDA64B472DFCBF3000E9B07E /* MBIMPingPongWebSocket.m in Sources */,
|
||||||
CD14F1AD219FFAE100E7DD22 /* MBIMConcurrentHTTPServer.m in Sources */,
|
CD14F1AD219FFAE100E7DD22 /* MBIMConcurrentHTTPServer.m in Sources */,
|
||||||
1AA43E91219EBC2C00EDF1A7 /* MBIMHTTPConnection.m in Sources */,
|
1AA43E91219EBC2C00EDF1A7 /* MBIMHTTPConnection.m in Sources */,
|
||||||
CDF62339219A8A5600690038 /* MBIMBridge.h in Sources */,
|
CDF62339219A8A5600690038 /* MBIMBridge.h in Sources */,
|
||||||
@@ -900,10 +827,12 @@
|
|||||||
CDF62335219A895D00690038 /* main.m in Sources */,
|
CDF62335219A895D00690038 /* main.m in Sources */,
|
||||||
CD60205C219B623F0024D9C5 /* MBIMMessagesListOperation.m in Sources */,
|
CD60205C219B623F0024D9C5 /* MBIMMessagesListOperation.m in Sources */,
|
||||||
CD14F1AA219FF3B800E7DD22 /* MBIMUpdateQueue.m in Sources */,
|
CD14F1AA219FF3B800E7DD22 /* MBIMUpdateQueue.m in Sources */,
|
||||||
|
CD3F62B1297769F2004305D9 /* MBIMURLUtilities.m in Sources */,
|
||||||
CD14F1A4219FF22700E7DD22 /* IMMessageItem+Encoded.m in Sources */,
|
CD14F1A4219FF22700E7DD22 /* IMMessageItem+Encoded.m in Sources */,
|
||||||
CD602062219B68950024D9C5 /* MBIMSendMessageOperation.m in Sources */,
|
CD602062219B68950024D9C5 /* MBIMSendMessageOperation.m in Sources */,
|
||||||
CD14F1A1219FE7D600E7DD22 /* MBIMUpdatePollOperation.m in Sources */,
|
CD14F1A1219FE7D600E7DD22 /* MBIMUpdatePollOperation.m in Sources */,
|
||||||
CD936A39289B49FC0093A1AC /* MBIMStatusOperation.m in Sources */,
|
CD936A39289B49FC0093A1AC /* MBIMStatusOperation.m in Sources */,
|
||||||
|
CDEFF9FE2CACC7A700063C52 /* MBIMResolveHandleOperation.m in Sources */,
|
||||||
CDE455A121A365AD0041F5DD /* MBIMMarkOperation.m in Sources */,
|
CDE455A121A365AD0041F5DD /* MBIMMarkOperation.m in Sources */,
|
||||||
CDE455A721A531ED0041F5DD /* MBIMDataResponse.m in Sources */,
|
CDE455A721A531ED0041F5DD /* MBIMDataResponse.m in Sources */,
|
||||||
CD936A35289B47D60093A1AC /* MBIMVersionOperation.m in Sources */,
|
CD936A35289B47D60093A1AC /* MBIMVersionOperation.m in Sources */,
|
||||||
@@ -1058,27 +987,10 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_IDENTITY = "";
|
|
||||||
CODE_SIGN_STYLE = Automatic;
|
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
|
||||||
DEFINES_MODULE = YES;
|
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
|
||||||
DYLIB_CURRENT_VERSION = 1;
|
|
||||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
|
||||||
FRAMEWORK_VERSION = A;
|
|
||||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
"@executable_path/../Frameworks",
|
|
||||||
"@loader_path/Frameworks",
|
|
||||||
);
|
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.github.CocoaHTTPServer;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
|
||||||
VERSION_INFO_PREFIX = "";
|
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -1086,26 +998,9 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_IDENTITY = "";
|
|
||||||
CODE_SIGN_STYLE = Automatic;
|
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
|
||||||
DEFINES_MODULE = YES;
|
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
|
||||||
DYLIB_CURRENT_VERSION = 1;
|
|
||||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
|
||||||
FRAMEWORK_VERSION = A;
|
|
||||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
"@executable_path/../Frameworks",
|
|
||||||
"@loader_path/Frameworks",
|
|
||||||
);
|
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.github.CocoaHTTPServer;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
|
||||||
VERSION_INFO_PREFIX = "";
|
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
@@ -1185,6 +1080,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "-";
|
CODE_SIGN_IDENTITY = "-";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
GCC_PREFIX_HEADER = kordophone/KPServer.pch;
|
GCC_PREFIX_HEADER = kordophone/KPServer.pch;
|
||||||
|
OTHER_LDFLAGS = "-ObjC";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
SYSTEM_FRAMEWORK_SEARCH_PATHS = (
|
SYSTEM_FRAMEWORK_SEARCH_PATHS = (
|
||||||
@@ -1201,6 +1097,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "-";
|
CODE_SIGN_IDENTITY = "-";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
GCC_PREFIX_HEADER = kordophone/KPServer.pch;
|
GCC_PREFIX_HEADER = kordophone/KPServer.pch;
|
||||||
|
OTHER_LDFLAGS = "-ObjC";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
SYSTEM_FRAMEWORK_SEARCH_PATHS = (
|
SYSTEM_FRAMEWORK_SEARCH_PATHS = (
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
#import "MBIMUpdateQueue.h"
|
#import "MBIMUpdateQueue.h"
|
||||||
#import "hooking.h"
|
#import "hooking.h"
|
||||||
|
|
||||||
#import <CocoaHTTPServer/HTTPServer.h>
|
#import "HTTPServer.h"
|
||||||
|
|
||||||
#import "IMCore_ClassDump.h"
|
#import "IMCore_ClassDump.h"
|
||||||
#import "IMFoundation_ClassDump.h"
|
#import "IMFoundation_ClassDump.h"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2018 James Magahern. All rights reserved.
|
// Copyright © 2018 James Magahern. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#import <CocoaHTTPServer/HTTPServer.h>
|
#import "HTTPServer.h"
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2018 James Magahern. All rights reserved.
|
// Copyright © 2018 James Magahern. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#import <CocoaHTTPServer/HTTPConnection.h>
|
#import "HTTPConnection.h"
|
||||||
|
|
||||||
@interface MBIMHTTPConnection : HTTPConnection
|
@interface MBIMHTTPConnection : HTTPConnection
|
||||||
|
|
||||||
|
|||||||
@@ -12,9 +12,11 @@
|
|||||||
#import "MBIMBridge_Private.h"
|
#import "MBIMBridge_Private.h"
|
||||||
#import "MBIMBridgeOperation.h"
|
#import "MBIMBridgeOperation.h"
|
||||||
#import "MBIMAuthToken.h"
|
#import "MBIMAuthToken.h"
|
||||||
|
#import "MBIMUpdateQueue.h"
|
||||||
|
#import "MBIMURLUtilities.h"
|
||||||
|
|
||||||
#import <Security/Security.h>
|
#import <Security/Security.h>
|
||||||
#import <CocoaHTTPServer/HTTPMessage.h>
|
#import "HTTPMessage.h"
|
||||||
|
|
||||||
@interface HTTPConnection (/* INTERNAL */)
|
@interface HTTPConnection (/* INTERNAL */)
|
||||||
- (BOOL)isAuthenticated;
|
- (BOOL)isAuthenticated;
|
||||||
@@ -107,6 +109,7 @@
|
|||||||
if (operationClass != nil) {
|
if (operationClass != nil) {
|
||||||
_currentOperation = [[operationClass alloc] initWithRequestURL:url completion:completion];
|
_currentOperation = [[operationClass alloc] initWithRequestURL:url completion:completion];
|
||||||
_currentOperation.requestBodyData = _bodyData;
|
_currentOperation.requestBodyData = _bodyData;
|
||||||
|
_currentOperation.request = self->request;
|
||||||
|
|
||||||
[[[MBIMBridge sharedInstance] operationQueue] addOperation:_currentOperation];
|
[[[MBIMBridge sharedInstance] operationQueue] addOperation:_currentOperation];
|
||||||
long status = dispatch_semaphore_wait(sema, dispatch_time(DISPATCH_TIME_NOW, (int64_t)(60.0 * NSEC_PER_SEC)));
|
long status = dispatch_semaphore_wait(sema, dispatch_time(DISPATCH_TIME_NOW, (int64_t)(60.0 * NSEC_PER_SEC)));
|
||||||
@@ -124,6 +127,28 @@
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (WebSocket *)webSocketForURI:(NSString *)path
|
||||||
|
{
|
||||||
|
NSURL *url = [NSURL URLWithString:path];
|
||||||
|
NSString *endpointName = [url lastPathComponent];
|
||||||
|
NSString *authTokenString = [url valueForQueryItemWithName:@"token"];
|
||||||
|
MBIMAuthToken *queryAuthToken = [[MBIMAuthToken alloc] initWithTokenString:authTokenString];
|
||||||
|
|
||||||
|
NSLog(@"Websocket for URI: %@ | authenticated request: %@", path, [self isAuthenticated] ? @"YES" : @"NO");
|
||||||
|
if ([endpointName isEqualToString:@"updates"]) {
|
||||||
|
if (![self isAuthenticated] && ![queryAuthToken isValid]) {
|
||||||
|
NSLog(@"Websocket: auth invalid, rejecting.");
|
||||||
|
NSLog(@"Query Token: %@, raw: %@", queryAuthToken, authTokenString);
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSLog(@"Vending websocket for consumer");
|
||||||
|
return [[MBIMUpdateQueue sharedInstance] vendUpdateWebSocketConsumerForRequest:request socket:asyncSocket];
|
||||||
|
}
|
||||||
|
|
||||||
|
return [super webSocketForURI:path];
|
||||||
|
}
|
||||||
|
|
||||||
- (BOOL)expectsRequestBodyFromMethod:(NSString *)method atPath:(NSString *)path
|
- (BOOL)expectsRequestBodyFromMethod:(NSString *)method atPath:(NSString *)path
|
||||||
{
|
{
|
||||||
if ([method isEqualToString:@"POST"]) {
|
if ([method isEqualToString:@"POST"]) {
|
||||||
|
|||||||
17
kordophone/Bridge/MBIMPingPongWebSocket.h
Normal file
17
kordophone/Bridge/MBIMPingPongWebSocket.h
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// MBIMPingPongWebSocket.h
|
||||||
|
// kordophoned
|
||||||
|
//
|
||||||
|
// Created by James Magahern on 6/13/25.
|
||||||
|
// Copyright © 2025 James Magahern. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "WebSocket.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface MBIMPingPongWebSocket : WebSocket
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
216
kordophone/Bridge/MBIMPingPongWebSocket.m
Normal file
216
kordophone/Bridge/MBIMPingPongWebSocket.m
Normal file
@@ -0,0 +1,216 @@
|
|||||||
|
//
|
||||||
|
// MBIMPingPongWebSocket.m
|
||||||
|
// kordophoned
|
||||||
|
//
|
||||||
|
// Created by James Magahern on 6/13/25.
|
||||||
|
// Copyright © 2025 James Magahern. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "MBIMPingPongWebSocket.h"
|
||||||
|
#import "GCDAsyncSocket.h"
|
||||||
|
|
||||||
|
// WebSocket opcodes (from the base class)
|
||||||
|
#define TIMEOUT_NONE -1
|
||||||
|
#define TIMEOUT_REQUEST_BODY 10
|
||||||
|
|
||||||
|
#define TAG_HTTP_REQUEST_BODY 100
|
||||||
|
#define TAG_HTTP_RESPONSE_HEADERS 200
|
||||||
|
#define TAG_HTTP_RESPONSE_BODY 201
|
||||||
|
|
||||||
|
#define TAG_PREFIX 300
|
||||||
|
#define TAG_MSG_PLUS_SUFFIX 301
|
||||||
|
#define TAG_MSG_WITH_LENGTH 302
|
||||||
|
#define TAG_MSG_MASKING_KEY 303
|
||||||
|
#define TAG_PAYLOAD_PREFIX 304
|
||||||
|
#define TAG_PAYLOAD_LENGTH 305
|
||||||
|
#define TAG_PAYLOAD_LENGTH16 306
|
||||||
|
#define TAG_PAYLOAD_LENGTH64 307
|
||||||
|
|
||||||
|
#define WS_OP_CONTINUATION_FRAME 0
|
||||||
|
#define WS_OP_TEXT_FRAME 1
|
||||||
|
#define WS_OP_BINARY_FRAME 2
|
||||||
|
#define WS_OP_CONNECTION_CLOSE 8
|
||||||
|
#define WS_OP_PING 9
|
||||||
|
#define WS_OP_PONG 10
|
||||||
|
|
||||||
|
// Additional tags for ping/pong handling
|
||||||
|
#define TAG_PING_PAYLOAD 400
|
||||||
|
#define TAG_PONG_SENT 401
|
||||||
|
|
||||||
|
@interface WebSocket ()
|
||||||
|
- (void)socket:(GCDAsyncSocket *)asyncSocket didReadData:(NSData *)data withTag:(long)tag;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation MBIMPingPongWebSocket
|
||||||
|
{
|
||||||
|
NSUInteger currentPayloadLength;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - Ping/Pong Frame Construction
|
||||||
|
|
||||||
|
- (NSData *)createPongFrameWithPayload:(NSData *)pingPayload {
|
||||||
|
NSMutableData *frame = [NSMutableData data];
|
||||||
|
|
||||||
|
// First byte: FIN (1) + RSV (000) + Opcode (1010 = 0xA for Pong)
|
||||||
|
uint8_t firstByte = 0x8A; // 10001010 in binary
|
||||||
|
[frame appendBytes:&firstByte length:1];
|
||||||
|
|
||||||
|
// Second byte: MASK (0) + Payload Length
|
||||||
|
NSUInteger payloadLength = [pingPayload length];
|
||||||
|
|
||||||
|
if (payloadLength <= 125) {
|
||||||
|
// Short payload length (0-125 bytes)
|
||||||
|
uint8_t secondByte = (uint8_t)payloadLength; // MASK bit is 0 for server-to-client
|
||||||
|
[frame appendBytes:&secondByte length:1];
|
||||||
|
}
|
||||||
|
else if (payloadLength <= 65535) {
|
||||||
|
// Medium payload length (126-65535 bytes)
|
||||||
|
uint8_t secondByte = 126;
|
||||||
|
[frame appendBytes:&secondByte length:1];
|
||||||
|
|
||||||
|
// Add 16-bit length in network byte order (big-endian)
|
||||||
|
uint16_t extendedLength = htons((uint16_t)payloadLength);
|
||||||
|
[frame appendBytes:&extendedLength length:2];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Large payload length (65536+ bytes) - rarely needed for pings
|
||||||
|
uint8_t secondByte = 127;
|
||||||
|
[frame appendBytes:&secondByte length:1];
|
||||||
|
|
||||||
|
// Add 64-bit length in network byte order (big-endian)
|
||||||
|
uint64_t extendedLength = OSSwapHostToBigInt64(payloadLength);
|
||||||
|
[frame appendBytes:&extendedLength length:8];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Append the payload (copied exactly from ping)
|
||||||
|
if (payloadLength > 0) {
|
||||||
|
[frame appendData:pingPayload];
|
||||||
|
}
|
||||||
|
|
||||||
|
return [frame copy];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)sendPongWithPayload:(NSData *)payload {
|
||||||
|
NSData *pongFrame = [self createPongFrameWithPayload:payload];
|
||||||
|
|
||||||
|
// Send the pong frame directly through the socket
|
||||||
|
[asyncSocket writeData:pongFrame withTimeout:TIMEOUT_NONE tag:TAG_PONG_SENT];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - Override AsyncSocket Delegate
|
||||||
|
|
||||||
|
- (void)socket:(GCDAsyncSocket *)asyncSocket didReadData:(NSData *)data withTag:(long)tag {
|
||||||
|
// xxx: sheesh: really need to get off of CococaHTTPServer.
|
||||||
|
NSData *maskingKey = [self valueForKey:@"maskingKey"];
|
||||||
|
BOOL nextFrameMasked = [[self valueForKey:@"nextFrameMasked"] boolValue];
|
||||||
|
NSUInteger nextOpCode = [[self valueForKey:@"nextOpCode"] unsignedIntValue];
|
||||||
|
|
||||||
|
// Handle our custom ping payload tag
|
||||||
|
if (tag == TAG_PING_PAYLOAD) {
|
||||||
|
// We've read the ping payload, now send the pong response
|
||||||
|
NSData *payload = data;
|
||||||
|
|
||||||
|
// If the frame was masked, we need to unmask it
|
||||||
|
if (nextFrameMasked && maskingKey) {
|
||||||
|
NSMutableData *unmaskedPayload = [data mutableCopy];
|
||||||
|
UInt8 *payloadBytes = [unmaskedPayload mutableBytes];
|
||||||
|
UInt8 *maskBytes = (UInt8 *)[maskingKey bytes];
|
||||||
|
|
||||||
|
for (NSUInteger i = 0; i < [data length]; i++) {
|
||||||
|
payloadBytes[i] ^= maskBytes[i % 4];
|
||||||
|
}
|
||||||
|
payload = [unmaskedPayload copy];
|
||||||
|
}
|
||||||
|
|
||||||
|
[self sendPongWithPayload:payload];
|
||||||
|
|
||||||
|
// Continue reading the next frame
|
||||||
|
[asyncSocket readDataToLength:1 withTimeout:TIMEOUT_NONE tag:TAG_PAYLOAD_PREFIX];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Let parent handle TAG_PAYLOAD_PREFIX first to set nextOpCode
|
||||||
|
if (tag == TAG_PAYLOAD_PREFIX) {
|
||||||
|
[super socket:asyncSocket didReadData:data withTag:tag];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now intercept ping/pong handling after nextOpCode is set
|
||||||
|
if (nextOpCode == WS_OP_PING || nextOpCode == WS_OP_PONG) {
|
||||||
|
if (tag == TAG_PAYLOAD_LENGTH) {
|
||||||
|
UInt8 frame = *(UInt8 *)[data bytes];
|
||||||
|
BOOL masked = (frame & 0x80) != 0;
|
||||||
|
NSUInteger length = frame & 0x7F;
|
||||||
|
nextFrameMasked = masked;
|
||||||
|
currentPayloadLength = length;
|
||||||
|
|
||||||
|
if (length <= 125) {
|
||||||
|
if (nextFrameMasked) {
|
||||||
|
[asyncSocket readDataToLength:4 withTimeout:TIMEOUT_NONE tag:TAG_MSG_MASKING_KEY];
|
||||||
|
} else if (length > 0) {
|
||||||
|
[asyncSocket readDataToLength:length withTimeout:TIMEOUT_NONE tag:TAG_PING_PAYLOAD];
|
||||||
|
} else {
|
||||||
|
// Empty payload, no masking - handle immediately
|
||||||
|
[self sendPongWithPayload:[NSData data]];
|
||||||
|
[asyncSocket readDataToLength:1 withTimeout:TIMEOUT_NONE tag:TAG_PAYLOAD_PREFIX];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (length == 126) {
|
||||||
|
[asyncSocket readDataToLength:2 withTimeout:TIMEOUT_NONE tag:TAG_PAYLOAD_LENGTH16];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
[asyncSocket readDataToLength:8 withTimeout:TIMEOUT_NONE tag:TAG_PAYLOAD_LENGTH64];
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tag == TAG_MSG_MASKING_KEY) {
|
||||||
|
// Store the masking key
|
||||||
|
maskingKey = [data copy];
|
||||||
|
|
||||||
|
// Now read the payload (or handle empty payload)
|
||||||
|
if (currentPayloadLength > 0) {
|
||||||
|
[asyncSocket readDataToLength:currentPayloadLength withTimeout:TIMEOUT_NONE tag:TAG_PING_PAYLOAD];
|
||||||
|
} else {
|
||||||
|
// Empty payload - send pong immediately
|
||||||
|
[self sendPongWithPayload:[NSData data]];
|
||||||
|
[asyncSocket readDataToLength:1 withTimeout:TIMEOUT_NONE tag:TAG_PAYLOAD_PREFIX];
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tag == TAG_PAYLOAD_LENGTH16) {
|
||||||
|
UInt8 *pFrame = (UInt8 *)[data bytes];
|
||||||
|
NSUInteger length = ((NSUInteger)pFrame[0] << 8) | (NSUInteger)pFrame[1];
|
||||||
|
|
||||||
|
if (nextFrameMasked) {
|
||||||
|
[asyncSocket readDataToLength:4 withTimeout:TIMEOUT_NONE tag:TAG_MSG_MASKING_KEY];
|
||||||
|
}
|
||||||
|
[asyncSocket readDataToLength:length withTimeout:TIMEOUT_NONE tag:TAG_PING_PAYLOAD];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tag == TAG_PAYLOAD_LENGTH64) {
|
||||||
|
// For 64-bit length, this is too complex for ping frames - just close
|
||||||
|
[self didClose];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// For all other cases, call the parent implementation
|
||||||
|
[super socket:asyncSocket didReadData:data withTag:tag];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - Helper Methods
|
||||||
|
|
||||||
|
// Expose the isValidWebSocketFrame method since it's private in the parent
|
||||||
|
- (BOOL)isValidWebSocketFrame:(UInt8)frame {
|
||||||
|
NSUInteger rsv = frame & 0x70;
|
||||||
|
NSUInteger opcode = frame & 0x0F;
|
||||||
|
if (rsv || (3 <= opcode && opcode <= 7) || (0xB <= opcode && opcode <= 0xF)) {
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
@@ -10,6 +10,9 @@
|
|||||||
#import "IMFoundation_ClassDump.h"
|
#import "IMFoundation_ClassDump.h"
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
@class GCDAsyncSocket;
|
||||||
|
@class HTTPMessage;
|
||||||
|
@class WebSocket;
|
||||||
|
|
||||||
@interface MBIMUpdateItem : NSObject
|
@interface MBIMUpdateItem : NSObject
|
||||||
@property (nonatomic, strong) IMChat *changedChat;
|
@property (nonatomic, strong) IMChat *changedChat;
|
||||||
@@ -24,11 +27,13 @@ typedef void (^MBIMUpdateConsumer)(NSArray<MBIMUpdateItem *> *items);
|
|||||||
|
|
||||||
+ (instancetype)sharedInstance;
|
+ (instancetype)sharedInstance;
|
||||||
|
|
||||||
- (void)addConsumer:(MBIMUpdateConsumer)consumer withLastSyncedMessageSeq:(NSInteger)messageSeq;
|
- (void)addPollingConsumer:(MBIMUpdateConsumer)consumer withLastSyncedMessageSeq:(NSInteger)messageSeq;
|
||||||
- (void)removeConsumer:(MBIMUpdateConsumer)consumer;
|
- (void)removePollingConsumer:(MBIMUpdateConsumer)consumer;
|
||||||
|
|
||||||
- (void)enqueueUpdateItem:(MBIMUpdateItem *)item;
|
- (void)enqueueUpdateItem:(MBIMUpdateItem *)item;
|
||||||
|
|
||||||
|
- (WebSocket *)vendUpdateWebSocketConsumerForRequest:(HTTPMessage *)request socket:(GCDAsyncSocket *)socket;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -9,20 +9,30 @@
|
|||||||
#import "MBIMUpdateQueue.h"
|
#import "MBIMUpdateQueue.h"
|
||||||
#import "IMMessageItem+Encoded.h"
|
#import "IMMessageItem+Encoded.h"
|
||||||
#import "IMChat+Encoded.h"
|
#import "IMChat+Encoded.h"
|
||||||
|
#import "MBIMHTTPConnection.h"
|
||||||
|
#import "MBIMURLUtilities.h"
|
||||||
|
#import "MBIMPingPongWebSocket.h"
|
||||||
|
|
||||||
|
#import "GCDAsyncSocket.h"
|
||||||
|
#import "HTTPMessage.h"
|
||||||
|
#import "WebSocket.h"
|
||||||
|
|
||||||
static const NSUInteger kUpdateItemsCullingLength = 100;
|
static const NSUInteger kUpdateItemsCullingLength = 100;
|
||||||
|
|
||||||
@interface MBIMUpdateItem (/*INTERNAL*/)
|
@interface MBIMUpdateItem (/*INTERNAL*/) <WebSocketDelegate>
|
||||||
@property (nonatomic, assign) NSUInteger messageSequenceNumber;
|
@property (nonatomic, assign) NSUInteger messageSequenceNumber;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation MBIMUpdateQueue {
|
@implementation MBIMUpdateQueue {
|
||||||
NSUInteger _messageSequenceNumber;
|
NSUInteger _messageSequenceNumber;
|
||||||
dispatch_queue_t _accessQueue;
|
dispatch_queue_t _accessQueue;
|
||||||
NSMutableArray *_consumers;
|
NSMutableArray *_longPollConsumers;
|
||||||
|
|
||||||
// Maps message sequence number to update item
|
// Maps message sequence number to update item
|
||||||
NSMutableDictionary<NSNumber *, MBIMUpdateItem *> *_updateItemHistory;
|
NSMutableDictionary<NSNumber *, MBIMUpdateItem *> *_updateItemHistory;
|
||||||
|
|
||||||
|
// WebSocket consumers
|
||||||
|
NSMutableDictionary<NSString *, MBIMUpdateConsumer> *_websocketConsumers;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (instancetype)sharedInstance
|
+ (instancetype)sharedInstance
|
||||||
@@ -41,20 +51,93 @@ static const NSUInteger kUpdateItemsCullingLength = 100;
|
|||||||
self = [super init];
|
self = [super init];
|
||||||
if (self) {
|
if (self) {
|
||||||
_accessQueue = dispatch_queue_create("net.buzzert.MBIMUpdateQueue", DISPATCH_QUEUE_SERIAL);
|
_accessQueue = dispatch_queue_create("net.buzzert.MBIMUpdateQueue", DISPATCH_QUEUE_SERIAL);
|
||||||
_consumers = [[NSMutableArray alloc] init];
|
|
||||||
_messageSequenceNumber = 0;
|
_messageSequenceNumber = 0;
|
||||||
_updateItemHistory = [[NSMutableDictionary alloc] init];
|
_updateItemHistory = [[NSMutableDictionary alloc] init];
|
||||||
|
_websocketConsumers = [[NSMutableDictionary alloc] init];
|
||||||
|
_longPollConsumers = [[NSMutableArray alloc] init];
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)addConsumer:(MBIMUpdateConsumer)consumer withLastSyncedMessageSeq:(NSInteger)messageSeq
|
- (void)addPollingConsumer:(MBIMUpdateConsumer)consumer withLastSyncedMessageSeq:(NSInteger)messageSeq
|
||||||
{
|
{
|
||||||
__weak NSMutableArray *consumers = _consumers;
|
if (![self _syncConsumer:consumer fromLastMessageSeq:messageSeq]) {
|
||||||
|
__weak NSMutableArray *consumers = _longPollConsumers;
|
||||||
|
dispatch_async(_accessQueue, ^{
|
||||||
|
[consumers addObject:consumer];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)removePollingConsumer:(MBIMUpdateConsumer)consumer
|
||||||
|
{
|
||||||
|
__weak NSMutableArray *consumers = _longPollConsumers;
|
||||||
|
dispatch_async(_accessQueue, ^{
|
||||||
|
[consumers removeObject:consumer];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)enqueueUpdateItem:(MBIMUpdateItem *)item
|
||||||
|
{
|
||||||
|
__weak __auto_type pollingConsumers = _longPollConsumers;
|
||||||
|
__weak __auto_type websocketConsumers = _websocketConsumers;
|
||||||
__weak NSMutableDictionary *updateItemHistory = _updateItemHistory;
|
__weak NSMutableDictionary *updateItemHistory = _updateItemHistory;
|
||||||
dispatch_async(_accessQueue, ^{
|
dispatch_async(_accessQueue, ^{
|
||||||
if ((messageSeq >= 0) && messageSeq < self->_messageSequenceNumber) {
|
self->_messageSequenceNumber++;
|
||||||
|
item.messageSequenceNumber = self->_messageSequenceNumber;
|
||||||
|
|
||||||
|
// Notify polling consumers
|
||||||
|
for (MBIMUpdateConsumer consumer in pollingConsumers) {
|
||||||
|
consumer(@[ item ]);
|
||||||
|
}
|
||||||
|
[pollingConsumers removeAllObjects];
|
||||||
|
|
||||||
|
// Notify websocket consumers
|
||||||
|
for (MBIMUpdateConsumer consumer in [websocketConsumers allValues]) {
|
||||||
|
consumer(@[ item ]);
|
||||||
|
}
|
||||||
|
|
||||||
|
[updateItemHistory setObject:item forKey:@(item.messageSequenceNumber)];
|
||||||
|
|
||||||
|
[self _cullUpdateItems];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
- (WebSocket *)vendUpdateWebSocketConsumerForRequest:(HTTPMessage *)request socket:(GCDAsyncSocket *)gcdSocket
|
||||||
|
{
|
||||||
|
WebSocket *socket = [[MBIMPingPongWebSocket alloc] initWithRequest:request socket:gcdSocket];
|
||||||
|
socket.delegate = self;
|
||||||
|
|
||||||
|
MBIMUpdateConsumer consumer = ^(NSArray<MBIMUpdateItem *> *updates) {
|
||||||
|
NSMutableArray *encodedUpdates = [NSMutableArray array];
|
||||||
|
for (MBIMUpdateItem *item in updates) {
|
||||||
|
NSDictionary *updateDict = [item dictionaryRepresentation];
|
||||||
|
[encodedUpdates addObject:updateDict];
|
||||||
|
}
|
||||||
|
|
||||||
|
NSData *data = [NSJSONSerialization dataWithJSONObject:encodedUpdates options:0 error:NULL];
|
||||||
|
[socket sendData:data];
|
||||||
|
};
|
||||||
|
|
||||||
|
NSString *messageSeqString = [[request url] valueForQueryItemWithName:@"seq"];
|
||||||
|
[self _syncConsumer:consumer fromLastMessageSeq:(messageSeqString ? [messageSeqString integerValue] : -1)];
|
||||||
|
|
||||||
|
__weak __auto_type websocketConsumers = _websocketConsumers;
|
||||||
|
dispatch_async(_accessQueue, ^{
|
||||||
|
NSString *websocketKey = [socket description];
|
||||||
|
[websocketConsumers setObject:consumer forKey:websocketKey];
|
||||||
|
});
|
||||||
|
|
||||||
|
return socket;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)_syncConsumer:(MBIMUpdateConsumer)consumer fromLastMessageSeq:(NSInteger)messageSeq
|
||||||
|
{
|
||||||
|
const BOOL needsSync = (messageSeq >= 0) && messageSeq < self->_messageSequenceNumber;
|
||||||
|
if (needsSync) {
|
||||||
|
__weak NSMutableDictionary *updateItemHistory = _updateItemHistory;
|
||||||
|
dispatch_async(_accessQueue, ^{
|
||||||
NSMutableArray *batchedUpdates = [NSMutableArray array];
|
NSMutableArray *batchedUpdates = [NSMutableArray array];
|
||||||
for (NSUInteger seq = messageSeq + 1; seq <= self->_messageSequenceNumber; seq++) {
|
for (NSUInteger seq = messageSeq + 1; seq <= self->_messageSequenceNumber; seq++) {
|
||||||
MBIMUpdateItem *item = [updateItemHistory objectForKey:@(seq)];
|
MBIMUpdateItem *item = [updateItemHistory objectForKey:@(seq)];
|
||||||
@@ -64,37 +147,10 @@ static const NSUInteger kUpdateItemsCullingLength = 100;
|
|||||||
}
|
}
|
||||||
|
|
||||||
consumer(batchedUpdates);
|
consumer(batchedUpdates);
|
||||||
} else {
|
});
|
||||||
[consumers addObject:consumer];
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)removeConsumer:(MBIMUpdateConsumer)consumer
|
return needsSync;
|
||||||
{
|
|
||||||
__weak NSMutableArray *consumers = _consumers;
|
|
||||||
dispatch_async(_accessQueue, ^{
|
|
||||||
[consumers removeObject:consumer];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)enqueueUpdateItem:(MBIMUpdateItem *)item
|
|
||||||
{
|
|
||||||
__weak NSMutableArray *consumers = _consumers;
|
|
||||||
__weak NSMutableDictionary *updateItemHistory = _updateItemHistory;
|
|
||||||
dispatch_async(_accessQueue, ^{
|
|
||||||
self->_messageSequenceNumber++;
|
|
||||||
item.messageSequenceNumber = self->_messageSequenceNumber;
|
|
||||||
|
|
||||||
for (MBIMUpdateConsumer consumer in consumers) {
|
|
||||||
consumer(@[ item ]);
|
|
||||||
}
|
|
||||||
|
|
||||||
[consumers removeAllObjects];
|
|
||||||
[updateItemHistory setObject:item forKey:@(item.messageSequenceNumber)];
|
|
||||||
|
|
||||||
[self _cullUpdateItems];
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)_cullUpdateItems
|
- (void)_cullUpdateItems
|
||||||
@@ -113,6 +169,18 @@ static const NSUInteger kUpdateItemsCullingLength = 100;
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma mark - <WebSocketDelegate>
|
||||||
|
|
||||||
|
- (void)webSocketDidClose:(WebSocket *)ws
|
||||||
|
{
|
||||||
|
// xxx: not great, but works.
|
||||||
|
NSString *websocketKey = [ws description];
|
||||||
|
__weak __auto_type websocketConsumers = _websocketConsumers;
|
||||||
|
dispatch_async(_accessQueue, ^{
|
||||||
|
[websocketConsumers removeObjectForKey:websocketKey];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation MBIMUpdateItem
|
@implementation MBIMUpdateItem
|
||||||
|
|||||||
@@ -7,8 +7,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import <CocoaHTTPServer/HTTPResponse.h>
|
#import "HTTPMessage.h"
|
||||||
#import <CocoaHTTPServer/HTTPErrorResponse.h>
|
#import "HTTPResponse.h"
|
||||||
|
#import "HTTPErrorResponse.h"
|
||||||
|
|
||||||
#import "MBIMJSONDataResponse.h"
|
#import "MBIMJSONDataResponse.h"
|
||||||
|
|
||||||
@@ -20,6 +21,7 @@ typedef void (^MBIMBridgeOperationCompletionBlock)(NSObject<HTTPResponse> * _Nul
|
|||||||
@property (class, nonatomic, readonly) NSString *endpointName;
|
@property (class, nonatomic, readonly) NSString *endpointName;
|
||||||
@property (class, nonatomic, readonly) BOOL requiresAuthentication; // default YES
|
@property (class, nonatomic, readonly) BOOL requiresAuthentication; // default YES
|
||||||
|
|
||||||
|
@property (nonatomic, strong) HTTPMessage *request;
|
||||||
@property (nonatomic, strong) NSData *requestBodyData;
|
@property (nonatomic, strong) NSData *requestBodyData;
|
||||||
@property (nonatomic, readonly) NSURL *requestURL;
|
@property (nonatomic, readonly) NSURL *requestURL;
|
||||||
@property (nonatomic, readonly) MBIMBridgeOperationCompletionBlock serverCompletionBlock;
|
@property (nonatomic, readonly) MBIMBridgeOperationCompletionBlock serverCompletionBlock;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "MBIMBridgeOperation.h"
|
#import "MBIMBridgeOperation.h"
|
||||||
|
#import "MBIMURLUtilities.h"
|
||||||
|
|
||||||
@interface MBIMBridgeOperation (/*INTERNAL*/)
|
@interface MBIMBridgeOperation (/*INTERNAL*/)
|
||||||
@property (nonatomic, strong) NSURL *requestURL;
|
@property (nonatomic, strong) NSURL *requestURL;
|
||||||
@@ -79,18 +80,7 @@
|
|||||||
|
|
||||||
- (NSString *)valueForQueryItemWithName:(NSString *)queryItemName
|
- (NSString *)valueForQueryItemWithName:(NSString *)queryItemName
|
||||||
{
|
{
|
||||||
NSURLComponents *urlComponents = [NSURLComponents componentsWithURL:self.requestURL
|
return [[self requestURL] valueForQueryItemWithName:queryItemName];
|
||||||
resolvingAgainstBaseURL:NO];
|
|
||||||
|
|
||||||
NSString *value = nil;
|
|
||||||
for (NSURLQueryItem *queryItem in [urlComponents queryItems]) {
|
|
||||||
if ([[queryItem name] isEqualToString:queryItemName]) {
|
|
||||||
value = [queryItem value];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -52,20 +52,34 @@
|
|||||||
NSURL *localURL = [transfer localURL];
|
NSURL *localURL = [transfer localURL];
|
||||||
NSString *extension = [[localURL pathExtension] lowercaseString];
|
NSString *extension = [[localURL pathExtension] lowercaseString];
|
||||||
if (preview) {
|
if (preview) {
|
||||||
|
IMPreviewConstraints constraints = IMPreviewConstraintsZero();
|
||||||
|
|
||||||
|
// Fetch preview constraints from transfer
|
||||||
|
NSDictionary *previewConstraintsDict = [[transfer attributionInfo] objectForKey:@"pgenszc"];
|
||||||
|
if (previewConstraintsDict) {
|
||||||
|
constraints = IMPreviewConstraintsFromDictionary(previewConstraintsDict);
|
||||||
|
} else {
|
||||||
|
// Or, make a guess.
|
||||||
|
constraints.maxPxWidth = 500.0;
|
||||||
|
constraints.scale = 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
NSURL *previewURL = IMAttachmentPreviewFileURL(localURL, extension, YES);
|
NSURL *previewURL = IMAttachmentPreviewFileURL(localURL, extension, YES);
|
||||||
|
if (!previewURL) {
|
||||||
|
// I'm not sure why this sometimes returns nil...
|
||||||
|
MBIMLogInfo(@"Unable to generate attachment preview cache URL for %@, making one up.", localURL);
|
||||||
|
|
||||||
|
NSURL *temporaryAttachmentCache = [[[NSFileManager defaultManager] temporaryDirectory] URLByAppendingPathComponent:@"kordophone_attachment_cache"];
|
||||||
|
temporaryAttachmentCache = [temporaryAttachmentCache URLByAppendingPathComponent:guid];
|
||||||
|
|
||||||
|
[[NSFileManager defaultManager] createDirectoryAtURL:temporaryAttachmentCache withIntermediateDirectories:YES attributes:nil error:nil];
|
||||||
|
|
||||||
|
previewURL = [temporaryAttachmentCache URLByAppendingPathComponent:[localURL lastPathComponent]];
|
||||||
|
}
|
||||||
|
|
||||||
if (![[NSFileManager defaultManager] fileExistsAtPath:[previewURL path]]) {
|
if (![[NSFileManager defaultManager] fileExistsAtPath:[previewURL path]]) {
|
||||||
MBIMLogInfo(@"Generating preview image for guid: %@ at %@", guid, [previewURL path]);
|
MBIMLogInfo(@"Generating preview image for guid: %@ at %@", guid, [previewURL path]);
|
||||||
|
|
||||||
// Fetch preview constraints from transfer
|
|
||||||
NSDictionary *previewConstraintsDict = [[transfer attributionInfo] objectForKey:@"pgenszc"];
|
|
||||||
if (!previewConstraintsDict) {
|
|
||||||
MBIMLogInfo(@"No preview constraints for attachment guid: %@", guid);
|
|
||||||
response = [[HTTPErrorResponse alloc] initWithErrorCode:500];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
IMPreviewConstraints constraints = IMPreviewConstraintsFromDictionary(previewConstraintsDict);
|
|
||||||
|
|
||||||
// Generate preview using preview generator manager
|
// Generate preview using preview generator manager
|
||||||
NSError *error = nil;
|
NSError *error = nil;
|
||||||
IMPreviewGeneratorManager *generator = [IMPreviewGeneratorManager sharedInstance];
|
IMPreviewGeneratorManager *generator = [IMPreviewGeneratorManager sharedInstance];
|
||||||
@@ -110,7 +124,9 @@
|
|||||||
mimeType = [NSString stringWithFormat:@"image/%@", extension];
|
mimeType = [NSString stringWithFormat:@"image/%@", extension];
|
||||||
}
|
}
|
||||||
|
|
||||||
response = [[MBIMDataResponse alloc] initWithData:responseData contentType:mimeType];
|
MBIMDataResponse *dataResponse = [[MBIMDataResponse alloc] initWithData:responseData contentType:mimeType];
|
||||||
|
dataResponse.httpHeaders[@"Cache-Control"] = @"public, immutable, max-age=31536000";
|
||||||
|
response = dataResponse;
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
self.serverCompletionBlock(response);
|
self.serverCompletionBlock(response);
|
||||||
|
|||||||
17
kordophone/Bridge/Operations/MBIMResolveHandleOperation.h
Normal file
17
kordophone/Bridge/Operations/MBIMResolveHandleOperation.h
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// MBIMResolveHandleOperation.h
|
||||||
|
// kordophoned
|
||||||
|
//
|
||||||
|
// Created by James Magahern on 10/1/24.
|
||||||
|
// Copyright © 2024 James Magahern. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "MBIMBridgeOperation.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface MBIMResolveHandleOperation : MBIMBridgeOperation
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
134
kordophone/Bridge/Operations/MBIMResolveHandleOperation.m
Normal file
134
kordophone/Bridge/Operations/MBIMResolveHandleOperation.m
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
//
|
||||||
|
// MBIMResolveHandleOperation.m
|
||||||
|
// kordophoned
|
||||||
|
//
|
||||||
|
// Created by James Magahern on 10/1/24.
|
||||||
|
// Copyright © 2024 James Magahern. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "MBIMResolveHandleOperation.h"
|
||||||
|
|
||||||
|
#import "IMCore_ClassDump.h"
|
||||||
|
#import "IMMessageItem+Encoded.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
# Response:
|
||||||
|
Dictionary {
|
||||||
|
"resolvedHandle": <Encoded IMHandle>
|
||||||
|
"status": valid | invalid | unknown,
|
||||||
|
"existingChat": chatGUID | null
|
||||||
|
}
|
||||||
|
|
||||||
|
# IMHandle:
|
||||||
|
Dictionary {
|
||||||
|
"id" : resolvedID
|
||||||
|
"name" : fullName | null
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
@interface NSNumber (IDSStatusUtility)
|
||||||
|
- (NSString *)_idsStatusDescription;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation NSNumber (IDSStatusUtility)
|
||||||
|
- (NSString *)_idsStatusDescription
|
||||||
|
{
|
||||||
|
switch ([self unsignedIntegerValue]) {
|
||||||
|
case 1: return @"valid";
|
||||||
|
case 2: return @"invalid";
|
||||||
|
default:
|
||||||
|
return @"unknown";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface IMHandle (Encoded)
|
||||||
|
- (NSDictionary *)mbim_dictionaryRepresentation;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation IMHandle (Encoded)
|
||||||
|
- (NSDictionary *)mbim_dictionaryRepresentation
|
||||||
|
{
|
||||||
|
return @{
|
||||||
|
@"id" : [self ID],
|
||||||
|
@"name" : [self name] ?: [NSNull null],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation MBIMResolveHandleOperation
|
||||||
|
|
||||||
|
+ (void)load { [super load]; }
|
||||||
|
|
||||||
|
+ (NSString *)endpointName
|
||||||
|
{
|
||||||
|
return @"resolveHandle";
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)main
|
||||||
|
{
|
||||||
|
NSString *specifiedIdentifier = [[self valueForQueryItemWithName:@"id"] _stripFZIDPrefix];
|
||||||
|
if (!specifiedIdentifier) {
|
||||||
|
MBIMLogError(@"No handle ID provided.");
|
||||||
|
HTTPErrorResponse *response = [[HTTPErrorResponse alloc] initWithErrorCode:500];
|
||||||
|
self.serverCompletionBlock(response);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IMStringIsPhoneNumber(specifiedIdentifier)) {
|
||||||
|
// Phone numbers will require a country code guess here.
|
||||||
|
// Passing nil, I presume, will make some kind of guess for the country code (useNetworkCountryCode).
|
||||||
|
specifiedIdentifier = IMCopyIDForPhoneNumber(specifiedIdentifier, nil, YES);
|
||||||
|
}
|
||||||
|
|
||||||
|
NSString *canonicalAddress = [specifiedIdentifier _bestGuessURI];
|
||||||
|
|
||||||
|
IMAccount *iMessageAccount = [[IMAccountController sharedInstance] bestAccountForService:[IMServiceImpl iMessageService]];
|
||||||
|
IMHandle *loginHandle = [iMessageAccount loginIMHandle];
|
||||||
|
|
||||||
|
NSString *lastAddressedHandle = [[[loginHandle ID] _stripFZIDPrefix] _bestGuessURI];
|
||||||
|
IMChatCalculateServiceForSendingNewComposeMaybeForce(@[ canonicalAddress ], lastAddressedHandle, nil, NO, IMStringIsEmail(canonicalAddress), NO, NO, NO, [iMessageAccount service], ^(BOOL allAddressesiMessageCapable, NSDictionary * _Nullable perRecipientAvailability, BOOL checkedServer, IMChatServiceForSendingAvailabilityError error)
|
||||||
|
{
|
||||||
|
NSError *encodingError = nil;
|
||||||
|
NSObject<HTTPResponse> *response = nil;
|
||||||
|
|
||||||
|
do {
|
||||||
|
// Assume we have returned just one key here.
|
||||||
|
NSString *resolvedHandleID = [[perRecipientAvailability allKeys] firstObject];
|
||||||
|
if (!resolvedHandleID) {
|
||||||
|
MBIMLogError(@"Unexpected missing handle id");
|
||||||
|
response = [[HTTPErrorResponse alloc] initWithErrorCode:500];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
IMHandle *resolvedHandle = [iMessageAccount imHandleWithID:resolvedHandleID];
|
||||||
|
if (!resolvedHandle) {
|
||||||
|
MBIMLogError(@"Couldn't resolve handle");
|
||||||
|
response = [[HTTPErrorResponse alloc] initWithErrorCode:500];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSString *handleStatus = [[perRecipientAvailability objectForKey:resolvedHandleID] _idsStatusDescription];
|
||||||
|
|
||||||
|
IMChat *existingChat = [[IMChatRegistry sharedInstance] existingChatForIMHandle:resolvedHandle];
|
||||||
|
|
||||||
|
NSDictionary *responseDict = @{
|
||||||
|
@"resolvedHandle" : [resolvedHandle mbim_dictionaryRepresentation],
|
||||||
|
@"status" : handleStatus,
|
||||||
|
@"existingChat" : [existingChat guid] ?: [NSNull null],
|
||||||
|
};
|
||||||
|
|
||||||
|
NSData *data = [NSJSONSerialization dataWithJSONObject:responseDict options:0 error:&encodingError];
|
||||||
|
if (encodingError) {
|
||||||
|
response = [[HTTPErrorResponse alloc] initWithErrorCode:500];
|
||||||
|
} else {
|
||||||
|
response = [[MBIMDataResponse alloc] initWithData:data contentType:@"application/json"];
|
||||||
|
}
|
||||||
|
} while (0);
|
||||||
|
|
||||||
|
self.serverCompletionBlock(response);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
#import "MBIMSendMessageOperation.h"
|
#import "MBIMSendMessageOperation.h"
|
||||||
|
|
||||||
#import "IMCore_ClassDump.h"
|
#import "IMCore_ClassDump.h"
|
||||||
|
#import "IMMessageItem+Encoded.h"
|
||||||
|
|
||||||
@implementation MBIMSendMessageOperation
|
@implementation MBIMSendMessageOperation
|
||||||
|
|
||||||
@@ -19,9 +20,9 @@
|
|||||||
return @"sendMessage";
|
return @"sendMessage";
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)_sendMessage:(NSString *)messageBody toChatWithGUID:(NSString *)chatGUID attachmentGUIDs:(NSArray<NSString *> *)guids
|
- (IMMessage *)_sendMessage:(NSString *)messageBody toChatWithGUID:(NSString *)chatGUID attachmentGUIDs:(NSArray<NSString *> *)guids
|
||||||
{
|
{
|
||||||
__block BOOL result = YES;
|
__block IMMessage *result = nil;
|
||||||
|
|
||||||
dispatch_sync([[self class] sharedIMAccessQueue], ^{
|
dispatch_sync([[self class] sharedIMAccessQueue], ^{
|
||||||
IMChat *chat = [[IMChatRegistry sharedInstance] existingChatWithGUID:chatGUID];
|
IMChat *chat = [[IMChatRegistry sharedInstance] existingChatWithGUID:chatGUID];
|
||||||
@@ -44,15 +45,38 @@
|
|||||||
|
|
||||||
if (!chat) {
|
if (!chat) {
|
||||||
MBIMLogInfo(@"Chat does not exist: %@", chatGUID);
|
MBIMLogInfo(@"Chat does not exist: %@", chatGUID);
|
||||||
result = NO;
|
|
||||||
} else {
|
} else {
|
||||||
[chat sendMessage:reply];
|
result = reply;
|
||||||
|
|
||||||
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
[chat sendMessage:reply];
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
- (NSDictionary *)adjustMessageSummaryInfoForSending:(NSDictionary *)messageSummaryInfo
|
||||||
|
{
|
||||||
|
NSMutableDictionary *adjustedInfo = [messageSummaryInfo mutableCopy];
|
||||||
|
if (!adjustedInfo) {
|
||||||
|
adjustedInfo = [NSMutableDictionary dictionary];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([fullText length] > 50) {
|
||||||
|
summary = [[summary substringToIndex:[summary rangeOfComposedCharacterSequenceAtIndex:kMaxSummaryLength].location] stringByAppendingString:@"…"];
|
||||||
|
adjustedInfo[IMMessageSummaryInfoSummary] = summary;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
adjustedInfo[IMMessageSummaryInfoTapbackRepresentationKey] = @"Loved";
|
||||||
|
|
||||||
|
return adjustedInfo;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
- (void)main
|
- (void)main
|
||||||
{
|
{
|
||||||
NSObject<HTTPResponse> *response = [[HTTPErrorResponse alloc] initWithErrorCode:500];
|
NSObject<HTTPResponse> *response = [[HTTPErrorResponse alloc] initWithErrorCode:500];
|
||||||
@@ -71,14 +95,25 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// tapbacks
|
||||||
|
#if 0
|
||||||
|
IMMessage *acknowledgment = [IMMessage instantMessageWithAssociatedMessageContent: /* [NSString stringWithFormat:@"%@ \"%%@\"", tapbackAction] */
|
||||||
|
flags:0
|
||||||
|
associatedMessageGUID:guid
|
||||||
|
associatedMessageType:IMAssociatedMessageTypeAcknowledgmentHeart
|
||||||
|
associatedMessageRange:[imMessage messagePartRange]
|
||||||
|
messageSummaryInfo:[self adjustMessageSummaryInfoForSending:message]
|
||||||
|
threadIdentifier:[imMessage threadIdentifier]];
|
||||||
|
#endif
|
||||||
|
|
||||||
NSArray *transferGUIDs = [args objectForKey:@"fileTransferGUIDs"];
|
NSArray *transferGUIDs = [args objectForKey:@"fileTransferGUIDs"];
|
||||||
if (!transferGUIDs) {
|
if (!transferGUIDs) {
|
||||||
transferGUIDs = @[];
|
transferGUIDs = @[];
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL result = [self _sendMessage:messageBody toChatWithGUID:guid attachmentGUIDs:transferGUIDs];
|
IMMessage *result = [self _sendMessage:messageBody toChatWithGUID:guid attachmentGUIDs:transferGUIDs];
|
||||||
if (result) {
|
if (result) {
|
||||||
response = [[HTTPErrorResponse alloc] initWithErrorCode:200];
|
response = [MBIMJSONDataResponse responseWithJSONObject:[result mbim_dictionaryRepresentation]];
|
||||||
}
|
}
|
||||||
|
|
||||||
self.serverCompletionBlock(response);
|
self.serverCompletionBlock(response);
|
||||||
|
|||||||
@@ -40,13 +40,13 @@
|
|||||||
weakSelf.serverCompletionBlock(response);
|
weakSelf.serverCompletionBlock(response);
|
||||||
};
|
};
|
||||||
|
|
||||||
[[MBIMUpdateQueue sharedInstance] addConsumer:_updateConsumer withLastSyncedMessageSeq:messageSeq];
|
[[MBIMUpdateQueue sharedInstance] addPollingConsumer:_updateConsumer withLastSyncedMessageSeq:messageSeq];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)cancel
|
- (void)cancel
|
||||||
{
|
{
|
||||||
[super cancel];
|
[super cancel];
|
||||||
[[MBIMUpdateQueue sharedInstance] removeConsumer:_updateConsumer];
|
[[MBIMUpdateQueue sharedInstance] removePollingConsumer:_updateConsumer];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSObject<HTTPResponse> *)cancelAndReturnTimeoutResponse
|
- (NSObject<HTTPResponse> *)cancelAndReturnTimeoutResponse
|
||||||
|
|||||||
@@ -38,7 +38,14 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSString *localPath = [NSTemporaryDirectory() stringByAppendingPathComponent:filename];
|
// Sanitize filename
|
||||||
|
NSCharacterSet *dotCharacter = [NSCharacterSet characterSetWithCharactersInString:@"."];
|
||||||
|
NSCharacterSet *illegalFileNameCharacters = [NSCharacterSet characterSetWithCharactersInString:@"/\\?%*|\"<>"];
|
||||||
|
NSString *sanitizedFilename = [[[filename componentsSeparatedByCharactersInSet:illegalFileNameCharacters]
|
||||||
|
componentsJoinedByString:@"-"]
|
||||||
|
stringByTrimmingCharactersInSet:dotCharacter];
|
||||||
|
|
||||||
|
NSString *localPath = [NSTemporaryDirectory() stringByAppendingPathComponent:sanitizedFilename];
|
||||||
NSURL *localURL = [NSURL fileURLWithPath:localPath];
|
NSURL *localURL = [NSURL fileURLWithPath:localPath];
|
||||||
BOOL success = [attachmentData writeToURL:localURL atomically:NO];
|
BOOL success = [attachmentData writeToURL:localURL atomically:NO];
|
||||||
if (!success) {
|
if (!success) {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import <CocoaHTTPServer/HTTPDataResponse.h>
|
#import "HTTPDataResponse.h"
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,10 @@
|
|||||||
|
|
||||||
+ (instancetype)responseWithJSONObject:(id)object
|
+ (instancetype)responseWithJSONObject:(id)object
|
||||||
{
|
{
|
||||||
NSData *data = [NSJSONSerialization dataWithJSONObject:object options:0 error:NULL];
|
NSError *error = nil;
|
||||||
|
NSData *data = [NSJSONSerialization dataWithJSONObject:object options:0 error:&error];
|
||||||
if (data == nil) {
|
if (data == nil) {
|
||||||
|
NSLog(@"JSON encoding error: %@", error);
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
17
kordophone/Bridge/Operations/Utilities/MBIMURLUtilities.h
Normal file
17
kordophone/Bridge/Operations/Utilities/MBIMURLUtilities.h
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// MBIMURLUtilities.h
|
||||||
|
// kordophoned
|
||||||
|
//
|
||||||
|
// Created by James Magahern on 1/17/23.
|
||||||
|
// Copyright © 2023 James Magahern. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface NSURL (MBIMURLUtilities)
|
||||||
|
- (nullable NSString *)valueForQueryItemWithName:(NSString *)queryItemName;
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
28
kordophone/Bridge/Operations/Utilities/MBIMURLUtilities.m
Normal file
28
kordophone/Bridge/Operations/Utilities/MBIMURLUtilities.m
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
//
|
||||||
|
// MBIMURLUtilities.m
|
||||||
|
// kordophoned
|
||||||
|
//
|
||||||
|
// Created by James Magahern on 1/17/23.
|
||||||
|
// Copyright © 2023 James Magahern. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "MBIMURLUtilities.h"
|
||||||
|
|
||||||
|
@implementation NSURL (MBIMURLUtilities)
|
||||||
|
|
||||||
|
- (nullable NSString *)valueForQueryItemWithName:(NSString *)queryItemName
|
||||||
|
{
|
||||||
|
NSURLComponents *urlComponents = [NSURLComponents componentsWithURL:self resolvingAgainstBaseURL:NO];
|
||||||
|
|
||||||
|
NSString *value = nil;
|
||||||
|
for (NSURLQueryItem *queryItem in [urlComponents queryItems]) {
|
||||||
|
if ([[queryItem name] isEqualToString:queryItemName]) {
|
||||||
|
value = [queryItem value];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "IMChat+Encoded.h"
|
#import "IMChat+Encoded.h"
|
||||||
|
#import "IMMessageItem+Encoded.h"
|
||||||
#import "MBIMHTTPUtilities.h"
|
#import "MBIMHTTPUtilities.h"
|
||||||
|
|
||||||
@implementation IMChat (Encoded)
|
@implementation IMChat (Encoded)
|
||||||
@@ -19,9 +20,18 @@
|
|||||||
chatDict[@"date"] = MBIMWebServerFormatISO8601([self lastFinishedMessageDate]);
|
chatDict[@"date"] = MBIMWebServerFormatISO8601([self lastFinishedMessageDate]);
|
||||||
chatDict[@"unreadCount"] = @([self unreadMessageCount]);
|
chatDict[@"unreadCount"] = @([self unreadMessageCount]);
|
||||||
|
|
||||||
|
// NOTE: -[IMChat lastMessage] != -[[IMChat chatItems] lastMessage].
|
||||||
|
// This means the messages we get back from the message list operation might be different from this here, which means we
|
||||||
|
// can't reliably use `lastMessage.guid` as a sync anchor.
|
||||||
|
//
|
||||||
|
// Ideally, everything should move to use chat items instead of messages so we can handle associated message items (reactions).
|
||||||
|
// When that happens, we should use `lastFinishedMessageItem` here instead of `lastMessage`, and avoid the db hit.
|
||||||
|
//
|
||||||
IMMessage *lastMessage = [self lastMessage];
|
IMMessage *lastMessage = [self lastMessage];
|
||||||
if (lastMessage) {
|
if (lastMessage) {
|
||||||
chatDict[@"lastMessagePreview"] = [[lastMessage text] string];
|
NSString *lastMessagePreview = [lastMessage descriptionForPurpose:IMMessageDescriptionConversationList];
|
||||||
|
chatDict[@"lastMessagePreview"] = [lastMessagePreview substringToIndex:MIN(128, [lastMessagePreview length])];
|
||||||
|
chatDict[@"lastMessage"] = [lastMessage mbim_dictionaryRepresentation];
|
||||||
}
|
}
|
||||||
|
|
||||||
NSMutableArray *participantStrings = [NSMutableArray array];
|
NSMutableArray *participantStrings = [NSMutableArray array];
|
||||||
|
|||||||
@@ -9,6 +9,40 @@
|
|||||||
#import "IMMessageItem+Encoded.h"
|
#import "IMMessageItem+Encoded.h"
|
||||||
#import "MBIMHTTPUtilities.h"
|
#import "MBIMHTTPUtilities.h"
|
||||||
|
|
||||||
|
static NSString* IMAssociatedMessageTypeValue(IMAssociatedMessageType type) {
|
||||||
|
switch (type) {
|
||||||
|
case IMAssociatedMessageTypeAcknowledgmentHeart:
|
||||||
|
return @"heart";
|
||||||
|
case IMAssociatedMessageTypeAcknowledgmentThumbsUp:
|
||||||
|
return @"thumbsUp";
|
||||||
|
case IMAssociatedMessageTypeAcknowledgmentThumbsDown:
|
||||||
|
return @"thumbsDown";
|
||||||
|
case IMAssociatedMessageTypeAcknowledgmentHa:
|
||||||
|
return @"ha";
|
||||||
|
case IMAssociatedMessageTypeAcknowledgmentExclamation:
|
||||||
|
return @"exclamation";
|
||||||
|
case IMAssociatedMessageTypeAcknowledgmentQuestionMark:
|
||||||
|
return @"questionMark";
|
||||||
|
|
||||||
|
case IMAssociatedMessageTypeAcknowledgmentHeartRemoved:
|
||||||
|
return @"removed heart";
|
||||||
|
case IMAssociatedMessageTypeAcknowledgmentThumbsUpRemoved:
|
||||||
|
return @"removed thumbsUp";
|
||||||
|
case IMAssociatedMessageTypeAcknowledgmentThumbsDownRemoved:
|
||||||
|
return @"removed thumbsDown";
|
||||||
|
case IMAssociatedMessageTypeAcknowledgmentHaRemoved:
|
||||||
|
return @"removed ha";
|
||||||
|
case IMAssociatedMessageTypeAcknowledgmentExclamationRemoved:
|
||||||
|
return @"removed exclamation";
|
||||||
|
case IMAssociatedMessageTypeAcknowledgmentQuestionMarkRemoved:
|
||||||
|
return @"removed questionMark";
|
||||||
|
|
||||||
|
case IMAssociatedMessageTypeUnspecified:
|
||||||
|
default:
|
||||||
|
return @"unknown";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@implementation IMMessage (Encoded)
|
@implementation IMMessage (Encoded)
|
||||||
|
|
||||||
- (NSDictionary *)mbim_dictionaryRepresentation
|
- (NSDictionary *)mbim_dictionaryRepresentation
|
||||||
@@ -19,6 +53,15 @@
|
|||||||
messageDict[@"sender"] = ([self isFromMe] ? nil : [[self sender] displayID]); // TODO: nil sender is still a weird way to represent this...
|
messageDict[@"sender"] = ([self isFromMe] ? nil : [[self sender] displayID]); // TODO: nil sender is still a weird way to represent this...
|
||||||
messageDict[@"guid"] = [self guid];
|
messageDict[@"guid"] = [self guid];
|
||||||
|
|
||||||
|
if ([self associatedMessageGUID]) {
|
||||||
|
NSString *encodedAssociatedMessageGUID = [self associatedMessageGUID];
|
||||||
|
messageDict[@"associatedMessageGUID"] = encodedAssociatedMessageGUID;
|
||||||
|
messageDict[@"associatedMessageType"] = IMAssociatedMessageTypeValue([self associatedMessageType]);
|
||||||
|
|
||||||
|
NSString *decodedAssociatedChatItemGUID = IMAssociatedMessageDecodeGUID(encodedAssociatedMessageGUID);
|
||||||
|
if (decodedAssociatedChatItemGUID) messageDict[@"associatedChatItemGUID"] = decodedAssociatedChatItemGUID;
|
||||||
|
}
|
||||||
|
|
||||||
if ([self fileTransferGUIDs]) {
|
if ([self fileTransferGUIDs]) {
|
||||||
// Support only images right now
|
// Support only images right now
|
||||||
NSMutableDictionary *attachmentMetadatas = [NSMutableDictionary dictionary];
|
NSMutableDictionary *attachmentMetadatas = [NSMutableDictionary dictionary];
|
||||||
|
|||||||
@@ -7,38 +7,69 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "MBIMLogging.h"
|
#import "MBIMLogging.h"
|
||||||
|
#import <os/log.h>
|
||||||
|
|
||||||
#define ESC(inner) "\033[" inner "m"
|
#define ESC(inner) "\033[" inner "m"
|
||||||
#define CLR ESC("0")
|
#define CLR ESC("0")
|
||||||
#define BLD "1;"
|
#define BLD "1;"
|
||||||
#define RED "31;"
|
#define RED "31;"
|
||||||
|
|
||||||
extern void __MBIMLogCommon(MBIMLogLevel level, NSString *format, ...)
|
static os_log_t MBIMOSLog(void)
|
||||||
{
|
{
|
||||||
static dispatch_once_t onceToken;
|
static dispatch_once_t onceToken;
|
||||||
static NSDateFormatter *dateFormatter = nil;
|
static os_log_t customLog = NULL;
|
||||||
dispatch_once(&onceToken, ^{
|
dispatch_once(&onceToken, ^{
|
||||||
dateFormatter = [[NSDateFormatter alloc] init];
|
customLog = os_log_create("net.buzzert.kordophoned", "General");
|
||||||
dateFormatter.dateFormat = @"Y-MM-d HH:mm:ss";
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return customLog;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern void __MBIMLogCommon(MBIMLogLevel level, NSString *format, ...)
|
||||||
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
NSString *message = [[NSString alloc] initWithFormat:format arguments:args];
|
NSString *message = [[NSString alloc] initWithFormat:format arguments:args];
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
const char *c_fmt = "%s";
|
if (getenv("NSRunningFromLaunchd") != NULL) {
|
||||||
if (level == ML_NOTIFY) {
|
// Running with launchd, use oslog.
|
||||||
// BOLD
|
os_log_t mbimlog = MBIMOSLog();
|
||||||
c_fmt = ESC(BLD) "%s";
|
|
||||||
} else if (level == ML_ERROR) {
|
|
||||||
c_fmt = ESC(RED) "%s";
|
|
||||||
} else if (level == ML_FATAL) {
|
|
||||||
c_fmt = ESC(BLD RED) "%s";
|
|
||||||
}
|
|
||||||
|
|
||||||
NSString *dateStr = [dateFormatter stringFromDate:[NSDate date]];
|
switch (level) {
|
||||||
fprintf(stdout, "%s: ", [dateStr UTF8String]);
|
case ML_INFO:
|
||||||
fprintf(stdout, c_fmt, [message UTF8String]);
|
os_log_debug(mbimlog, "%{public}@", message);
|
||||||
fprintf(stdout, CLR "\n");
|
break;
|
||||||
|
case ML_NOTIFY:
|
||||||
|
os_log_info(mbimlog, "%{public}@", message);
|
||||||
|
break;
|
||||||
|
case ML_FATAL:
|
||||||
|
case ML_ERROR:
|
||||||
|
os_log_error(mbimlog, "%{public}@", message);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Otherwise, write to stdout.
|
||||||
|
static dispatch_once_t onceToken;
|
||||||
|
static NSDateFormatter *dateFormatter = nil;
|
||||||
|
dispatch_once(&onceToken, ^{
|
||||||
|
dateFormatter = [[NSDateFormatter alloc] init];
|
||||||
|
dateFormatter.dateFormat = @"Y-MM-d HH:mm:ss";
|
||||||
|
});
|
||||||
|
|
||||||
|
const char *c_fmt = "%s";
|
||||||
|
if (level == ML_NOTIFY) {
|
||||||
|
// BOLD
|
||||||
|
c_fmt = ESC(BLD) "%s";
|
||||||
|
} else if (level == ML_ERROR) {
|
||||||
|
c_fmt = ESC(RED) "%s";
|
||||||
|
} else if (level == ML_FATAL) {
|
||||||
|
c_fmt = ESC(BLD RED) "%s";
|
||||||
|
}
|
||||||
|
|
||||||
|
NSString *dateStr = [dateFormatter stringFromDate:[NSDate date]];
|
||||||
|
fprintf(stdout, "%s: ", [dateStr UTF8String]);
|
||||||
|
fprintf(stdout, c_fmt, [message UTF8String]);
|
||||||
|
fprintf(stdout, CLR "\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user