Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Minor formatting changes

  • Loading branch information...
commit 3529ea4bfaaa77d8aaf6e23bf5462f8a0347aebc 1 parent 6fc2699
@robbiehanson authored
View
22 Authentication/X-Facebook-Platform/XMPPXFacebookPlatformAuthentication.m
@@ -22,17 +22,6 @@
static char facebookAppIdKey;
@interface XMPPXFacebookPlatformAuthentication ()
-
-- (NSDictionary *)dictionaryFromChallenge:(NSXMLElement *)challenge;
-- (NSString *)base64EncodedFullResponse;
-
-@end
-
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark -
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-@implementation XMPPXFacebookPlatformAuthentication
{
#if __has_feature(objc_arc_weak)
__weak XMPPStream *xmppStream;
@@ -48,6 +37,17 @@ @implementation XMPPXFacebookPlatformAuthentication
NSString *method;
}
+- (NSDictionary *)dictionaryFromChallenge:(NSXMLElement *)challenge;
+- (NSString *)base64EncodedFullResponse;
+
+@end
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+#pragma mark -
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+@implementation XMPPXFacebookPlatformAuthentication
+
+ (NSString *)mechanismName
{
return @"X-FACEBOOK-PLATFORM";
View
16 Xcode/DesktopXMPP/AppDelegate.h
@@ -6,14 +6,14 @@
@interface AppDelegate : NSObject
{
- __strong XMPPStream *xmppStream;
- __strong XMPPReconnect *xmppReconnect;
- __strong XMPPRoster *xmppRoster;
- __strong XMPPRosterMemoryStorage *xmppRosterStorage;
- __strong XMPPCapabilities *xmppCapabilities;
- __strong XMPPCapabilitiesCoreDataStorage *xmppCapabilitiesStorage;
- __strong XMPPPing *xmppPing;
- __strong XMPPTime *xmppTime;
+ XMPPStream *xmppStream;
+ XMPPReconnect *xmppReconnect;
+ XMPPRoster *xmppRoster;
+ XMPPRosterMemoryStorage *xmppRosterStorage;
+ XMPPCapabilities *xmppCapabilities;
+ XMPPCapabilitiesCoreDataStorage *xmppCapabilitiesStorage;
+ XMPPPing *xmppPing;
+ XMPPTime *xmppTime;
NSMutableArray *turnSockets;
View
48 Xcode/DesktopXMPP/AppDelegate.m
@@ -21,11 +21,19 @@ - (id)init
{
if ((self = [super init]))
{
+ //
// Configure logging framework
+ //
+ // The XMPPFramework uses the CocoaLumberjack framework to provide fast & flexible logging.
+ // There's tons of information about Lumberjack online:
+ // https://github.com/robbiehanson/CocoaLumberjack
+ // https://github.com/robbiehanson/CocoaLumberjack/wiki
+ //
+ // But this one line is all we need to configure the logging framework to dump to the Xcode console.
[DDLog addLogger:[DDTTYLogger sharedInstance]];
- // Initialize variables
+ // Initialize xmpp stream and modules
xmppStream = [[XMPPStream alloc] init];
@@ -43,6 +51,21 @@ - (id)init
// xmppPing = [[XMPPPing alloc] init];
// xmppTime = [[XMPPTime alloc] init];
+ // Activate xmpp modules
+
+ [xmppReconnect activate:xmppStream];
+ [xmppRoster activate:xmppStream];
+ [xmppCapabilities activate:xmppStream];
+ [xmppPing activate:xmppStream];
+ [xmppTime activate:xmppStream];
+
+ // Add ourself as a delegate to anything we may be interested in
+
+ [xmppReconnect addDelegate:self delegateQueue:dispatch_get_main_queue()];
+ [xmppCapabilities addDelegate:self delegateQueue:dispatch_get_main_queue()];
+
+ // Initialize other stuff
+
turnSockets = [[NSMutableArray alloc] init];
}
return self;
@@ -52,34 +75,11 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
DDLogInfo(@"%@: %@", THIS_FILE, THIS_METHOD);
- [xmppStream addDelegate:self delegateQueue:dispatch_get_main_queue()];
-
- // Activate xmpp modules
-
- [xmppReconnect activate:xmppStream];
- [xmppRoster activate:xmppStream];
- [xmppCapabilities activate:xmppStream];
- [xmppPing activate:xmppStream];
- [xmppTime activate:xmppStream];
-
- // Add ourself as a delegate to anything we may be interested in
-
-// [xmppStream addDelegate:self delegateQueue:dispatch_get_main_queue()];
- [xmppReconnect addDelegate:self delegateQueue:dispatch_get_main_queue()];
- [xmppCapabilities addDelegate:self delegateQueue:dispatch_get_main_queue()];
- [xmppPing addDelegate:self delegateQueue:dispatch_get_main_queue()];
- [xmppTime addDelegate:self delegateQueue:dispatch_get_main_queue()];
-
// Start the GUI stuff
[rosterController displaySignInSheet];
}
-- (void)xmppStream:(XMPPStream *)sender didRegisterModule:(id)module
-{
- DDLogVerbose(@"%@: xmppStream:didRegisterModule: %@", THIS_FILE, module);
-}
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark XEP-0065 Support
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Please sign in to comment.
Something went wrong with that request. Please try again.