-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathHBDemoController.h
54 lines (41 loc) · 1.56 KB
/
HBDemoController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//
// HBDemoController.h
// Blackbox
//
// Created by Matt Patenaude on 8/24/10.
// Copyright 2010 Matt Patenaude. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "BBServer.h"
#import "BBResponder.h"
#import "HBResponder.h"
#import "HBResponderDelegate.h"
// Constants
#define BBDemoServerDefaultPort 8080
@interface HBDemoController : NSObject<BBResponder,HBResponderDelegate> {
BBServer *server;
BOOL serverIsRunning;
NSMutableArray *openConnections;
NSMutableArray *connectionNames;
IBOutlet NSImageView *statusImageView;
IBOutlet NSTextField *statusField;
IBOutlet NSTextField *pushStringField;
// Our other responder
IBOutlet HBResponder *haleBoppResponder;
// Request table view
IBOutlet NSTableView *connectionTable;
}
// Application delegate methods
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication;
// Control methods
- (IBAction)startStopServer:(id)sender;
- (IBAction)pushStringToSelectedConnection:(id)sender;
// Responder methods (BBResponder)
- (void)handleRequest:(BBRequest *)theRequest;
// HaleBopp delegate methods (HBResponderDelegate)
- (void)responder:(HBResponder *)responder startedLongPollWithRequest:(BBRequest *)theRequest identifier:(NSString *)theIdentifier;
- (void)responder:(HBResponder *)responder requestNoLongerAvailableWithIdentifier:(NSString *)theIdentifier;
// Table data source methods
- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView;
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex;
@end