summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSHost.java
blob: 4981433ca173e00d5e944ef0e7803fe975163496 (plain)
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
55
56
57
58
59
60
61
62
63
64
package org.eclipse.swt.internal.cocoa;

public class NSHost extends NSObject {

public NSHost() {
	super();
}

public NSHost(int id) {
	super(id);
}

public NSString address() {
	int result = OS.objc_msgSend(this.id, OS.sel_address);
	return result != 0 ? new NSString(result) : null;
}

public NSArray addresses() {
	int result = OS.objc_msgSend(this.id, OS.sel_addresses);
	return result != 0 ? new NSArray(result) : null;
}

public static NSHost currentHost() {
	int result = OS.objc_msgSend(OS.class_NSHost, OS.sel_currentHost);
	return result != 0 ? new NSHost(result) : null;
}

public static void flushHostCache() {
	OS.objc_msgSend(OS.class_NSHost, OS.sel_flushHostCache);
}

public static NSHost hostWithAddress(NSString address) {
	int result = OS.objc_msgSend(OS.class_NSHost, OS.sel_hostWithAddress_1, address != null ? address.id : 0);
	return result != 0 ? new NSHost(result) : null;
}

public static NSHost hostWithName(NSString name) {
	int result = OS.objc_msgSend(OS.class_NSHost, OS.sel_hostWithName_1, name != null ? name.id : 0);
	return result != 0 ? new NSHost(result) : null;
}

public boolean isEqualToHost(NSHost aHost) {
	return OS.objc_msgSend(this.id, OS.sel_isEqualToHost_1, aHost != null ? aHost.id : 0) != 0;
}

public static boolean isHostCacheEnabled() {
	return OS.objc_msgSend(OS.class_NSHost, OS.sel_isHostCacheEnabled) != 0;
}

public NSString name() {
	int result = OS.objc_msgSend(this.id, OS.sel_name);
	return result != 0 ? new NSString(result) : null;
}

public NSArray names() {
	int result = OS.objc_msgSend(this.id, OS.sel_names);
	return result != 0 ? new NSArray(result) : null;
}

public static void setHostCacheEnabled(boolean flag) {
	OS.objc_msgSend(OS.class_NSHost, OS.sel_setHostCacheEnabled_1, flag);
}

}