Adun  0.83
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ULServerInterface.h
1 /*
2  Project: AdunServer
3 
4  Copyright (C) 2005 Michael Johnston & Jordi Villą--Freixa
5 
6  Author: Michael Johnston
7 
8  Created: 2005-05-31 15:42:00 +0200 by michael johnston
9 
10  This application is free software; you can redistribute it and/or
11  modify it under the terms of the GNU General Public
12  License as published by the Free Software Foundation; either
13  version 2 of the License, or (at your option) any later version.
14 
15  This application is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Library General Public License for more details.
19 
20  You should have received a copy of the GNU General Public
21  License along with this library; if not, write to the Free
22  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
23 */
24 
25 #ifndef _ULSERVERINTERFACE_
26 #define _ULSERVERINTERFACE_
27 
28 #include <ULFramework/ULFileSystemDatabaseBackend.h>
29 
35 #define ULDatabaseSharingErrorDomain @"ULDatabaseSharing.ErrorDomain"
36 
41 typedef enum
42 {
48 }
50 
64 - (bycopy id) execute: (NSDictionary*) commandDict error: (out NSError**) errorResult process: (id) process;
69 - (NSMutableDictionary*) optionsForCommand: (NSString*) command process: (id) process;
74 - (NSArray*) validCommandsForProcess: (id) process;
75 @end
76 
88 - (int) port;
92 - (BOOL) isDistributed;
99 - (NSHost*) serverHost;
103 - (NSString*) socketAddress;
107 - (NSString*) registeredName;
108 @end
109 
118 - (oneway void) haltProcess: (id) process;
122 - (oneway void) terminateProcess: (id) process;
126 - (oneway void) restartProcess: (id) process;
130 - (NSError*) startSimulation: (id) process;
137 - (void) processWillDisconnect: (id) process;
146 - (BOOL) reconnectProcess: (id) process;
150 - (void) removeDataForProcess: (id)process;
151 @end
152 
177 - (id) clientForDatabase: (NSString*) databaseName
178  clientName: (NSString*) clientName
179  user: (NSString*) userName
180  password: (NSString*) password
181  requestingHost: (NSString*) hostname
182  error: (out NSError**) error;
186 - (void) removeClientWithName: (NSString*) clientName
187  accessingDatabase: (NSString*) databaseName
188  user: (NSString*) userName
189  password: (NSString*) password
190  requestingHost: (NSString*) hostname;
197 - (NSArray*) publishedDatabases;
198 @end
199 
210 - (BOOL) publishDatabase: (NSString*) databaseIdentifier error: (out NSError**) error;
216 - (BOOL) retractDatabase: (NSString*) databaseIdentifier error: (out NSError**) error;
223 - (BOOL) addDatabaseToP2PShares: (NSString*) databaseIdentifer
224  withConfiguration: (NSDictionary*) configuration
225  error: (out NSError**) error;
233 - (BOOL) removeDatabaseFromP2PShares: (NSString*) databaseIdentifier error: (out NSError**) error;
237 - (NSArray*) P2PShares;
243 - (NSArray*) publishedDatabaseIdentifiers;
244 @end
245 
246 
247 #endif