// Client stub for the Ticket PHP Class
function Ticket(callback) {
	mode = 'sync';
	if (callback) { mode = 'async'; }
	this.className = 'Ticket';
	this.dispatcher = new HTML_AJAX_Dispatcher(this.className,mode,callback,'/examples/Chapter12/app/server.php?','JSON');
}
Ticket.prototype  = {
	Sync: function() { this.dispatcher.Sync(); }, 
	Async: function(callback) { this.dispatcher.Async(callback); },
	addUser: function() { return this.dispatcher.doCall('addUser',arguments); },
	updateUser: function() { return this.dispatcher.doCall('updateUser',arguments); },
	listUsers: function() { return this.dispatcher.doCall('listUsers',arguments); },
	addTicket: function() { return this.dispatcher.doCall('addTicket',arguments); },
	updateTicket: function() { return this.dispatcher.doCall('updateTicket',arguments); },
	getTicket: function() { return this.dispatcher.doCall('getTicket',arguments); },
	assignTicket: function() { return this.dispatcher.doCall('assignTicket',arguments); },
	listUnassignedTickets: function() { return this.dispatcher.doCall('listUnassignedTickets',arguments); },
	listAssignedTickets: function() { return this.dispatcher.doCall('listAssignedTickets',arguments); },
	listUpdatedTickets: function() { return this.dispatcher.doCall('listUpdatedTickets',arguments); },
	login: function() { return this.dispatcher.doCall('login',arguments); },
	isLoggedIn: function() { return this.dispatcher.doCall('isLoggedIn',arguments); },
	currentUserId: function() { return this.dispatcher.doCall('currentUserId',arguments); },
	logout: function() { return this.dispatcher.doCall('logout',arguments); }
}

