Artifact 6897d0dd8c25e173de196df48ccdad8b66de77abef058519ca2d83bea0f9c7c6:
- File
test.m
— part of check-in
[acb2c5cbf0]
at
2011-02-08 19:45:21
on branch trunk
— Initial commit.
Work done by me and Florian Zeitz. (user: js, size: 703) [annotate] [blame] [check-ins using]
#include <ObjFW/ObjFW.h> #import "XMPPConnection.h" @interface AppDelegate: OFObject { XMPPConnection *conn; } @end OF_APPLICATION_DELEGATE(AppDelegate) @implementation AppDelegate - (void)applicationDidFinishLaunching { OFArray *arguments = [OFApplication arguments]; conn = [[XMPPConnection alloc] init]; if (arguments.count != 3) { of_log(@"Invalid count of command line arguments!"); [OFApplication terminateWithStatus: 1]; } [conn setServer: [arguments objectAtIndex: 0]]; [conn setUsername: [arguments objectAtIndex: 1]]; [conn setPassword: [arguments objectAtIndex: 2]]; [conn setResource: @"ObjXMPP"]; [conn setUseTLS: NO]; [conn connect]; [conn handleConnection]; } @end