]> cgit.babelmonkeys.de Git - jubjub.git/blobdiff - src/gui/cli/JubCLIUI.h
Add a zxcv-like CLI frontend
[jubjub.git] / src / gui / cli / JubCLIUI.h
diff --git a/src/gui/cli/JubCLIUI.h b/src/gui/cli/JubCLIUI.h
new file mode 100644 (file)
index 0000000..b610d0a
--- /dev/null
@@ -0,0 +1,26 @@
+#import <ObjFW/ObjFW.h>
+#import <ObjXMPP/ObjXMPP.h>
+
+#import "JubUI.h"
+
+@class JubCLIChatUI;
+@class JubChatClient;
+@protocol JubCLICommand;
+
+@interface JubCLIUI: OFObject <JubUI, XMPPContactManagerDelegate>
+{
+       XMPPContact *_lastIn;
+       JubCLIChatUI *_sink;
+       JubChatClient *_client;
+       XMPPContactManager *_contactManager;
+       OFMutableDictionary *_commands;
+}
+@property (readonly) JubChatClient *client;
+@property (readonly) XMPPContact *lastIn;
+@property (retain) JubCLIChatUI *sink;
+
+- (BOOL)Jub_userInputWithStream: (OFStream*)stream
+                          line: (OFString*)line
+                     exception: (OFException*)exception;
+- (void)addCommand: (id<JubCLICommand>)command;
+@end