Private
Public Access
1
0

Move off of macosxinternal sdk

This moves kordophone off of using the internal SDK and switches to using class dumped headers instead.
This commit is contained in:
James Magahern
2019-12-16 17:29:53 -08:00
parent 6c089f737b
commit 4f7a6d1b87
20 changed files with 8610 additions and 207 deletions

View File

@@ -16,11 +16,8 @@
#import <CocoaHTTPServer/HTTPServer.h>
#import <IMCore/IMCore.h>
#import <IMCore/IMCore_Private.h>
#import <IMFoundation/IMFoundation.h>
#import <IMFoundation/IMFoundation_Private.h>
#import "IMCore_ClassDump.h"
#import "IMFoundation_ClassDump.h"
static const UInt16 kDefaultPort = 5738;
@@ -136,11 +133,11 @@ static NSString *const MBIMBridgeToken = @"net.buzzert.kordophone";
[self registerForNotifications];
[sDaemonController setDelegate:self];
[sDaemonListener addHandler:self];
[[IMDaemonController sharedInstance] setDelegate:(id)self];
[[[IMDaemonController sharedInstance] listener] addHandler:self];
if (![sDaemonController hasListenerForID:MBIMBridgeToken]) {
if (![sDaemonController addListenerID:MBIMBridgeToken capabilities:(kFZListenerCapFileTransfers | kFZListenerCapManageStatus | kFZListenerCapChats | kFZListenerCapMessageHistory | kFZListenerCapIDQueries | kFZListenerCapSendMessages)]) {
if (![[IMDaemonController sharedInstance] hasListenerForID:MBIMBridgeToken]) {
if (![[IMDaemonController sharedInstance] addListenerID:MBIMBridgeToken capabilities:(kFZListenerCapFileTransfers | kFZListenerCapManageStatus | kFZListenerCapChats | kFZListenerCapMessageHistory | kFZListenerCapIDQueries | kFZListenerCapSendMessages)]) {
MBIMLogFatal(@"Failed to connect to imagent");
[self _terminate];
@@ -153,7 +150,7 @@ static NSString *const MBIMBridgeToken = @"net.buzzert.kordophone";
- (void)disconnect
{
[sDaemonController removeListenerID:MBIMBridgeToken];
[[IMDaemonController sharedInstance] removeListenerID:MBIMBridgeToken];
}
#pragma mark -
@@ -196,7 +193,7 @@ static NSString *const MBIMBridgeToken = @"net.buzzert.kordophone";
- (void)_chatRegistryDidLoad:(NSNotification *)notification
{
MBIMLogInfo(@"Loaded chat registry. %lu existing chats", (unsigned long)[sChatRegistry numberOfExistingChats]);
MBIMLogInfo(@"Loaded chat registry. %lu existing chats", (unsigned long)[[IMChatRegistry sharedInstance] numberOfExistingChats]);
}
- (void)_chatItemsDidChange:(NSNotification *)notification