var IChatService=function() {
IChatService.initializeBase(this);
this._timeout = 0;
this._userContext = null;
this._succeeded = null;
this._failed = null;
}
IChatService.prototype={
_get_path:function() {
 var p = this.get_path();
 if (p) return p;
 else return IChatService._staticInstance.get_path();},
GetAllChatRooms:function(succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'GetAllChatRooms',false,{},succeededCallback,failedCallback,userContext); },
CreateChatRoom:function(chatType,chatRoomId,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'CreateChatRoom',false,{chatType:chatType,chatRoomId:chatRoomId},succeededCallback,failedCallback,userContext); },
GetChatRoom:function(chatRoomID,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'GetChatRoom',false,{chatRoomID:chatRoomID},succeededCallback,failedCallback,userContext); },
GetPublicChatRoom:function(succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'GetPublicChatRoom',false,{},succeededCallback,failedCallback,userContext); },
DestroyChatRoom:function(roomID,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'DestroyChatRoom',false,{roomID:roomID},succeededCallback,failedCallback,userContext); },
DestroyAll:function(succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'DestroyAll',false,{},succeededCallback,failedCallback,userContext); },
JoinChatRoom:function(chatRoomID,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'JoinChatRoom',false,{chatRoomID:chatRoomID},succeededCallback,failedCallback,userContext); },
KickParticipant:function(participant,chatRoomID,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'KickParticipant',false,{participant:participant,chatRoomID:chatRoomID},succeededCallback,failedCallback,userContext); },
GetAllChatParticipants:function(chatRoomID,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'GetAllChatParticipants',false,{chatRoomID:chatRoomID},succeededCallback,failedCallback,userContext); },
GetNewChatParticipants:function(chatRoomID,lastChecked,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'GetNewChatParticipants',false,{chatRoomID:chatRoomID,lastChecked:lastChecked},succeededCallback,failedCallback,userContext); },
SendMessage:function(chatRoomID,message,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'SendMessage',false,{chatRoomID:chatRoomID,message:message},succeededCallback,failedCallback,userContext); },
SendAndRecieve:function(chatRoomID,lastRecieved,userId,messages,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'SendAndRecieve',false,{chatRoomID:chatRoomID,lastRecieved:lastRecieved,userId:userId,messages:messages},succeededCallback,failedCallback,userContext); },
getAllMessages:function(chatRoomId,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'getAllMessages',false,{chatRoomId:chatRoomId},succeededCallback,failedCallback,userContext); },
getNewMessages:function(chatRoomId,lastRecieved,userId,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'getNewMessages',false,{chatRoomId:chatRoomId,lastRecieved:lastRecieved,userId:userId},succeededCallback,failedCallback,userContext); },
CleanUp:function(succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'CleanUp',false,{},succeededCallback,failedCallback,userContext); },
ExitChatRoom:function(chatRoomId,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'ExitChatRoom',false,{chatRoomId:chatRoomId},succeededCallback,failedCallback,userContext); },
UpdateStatus:function(onlineStatus,allowSounds,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'UpdateStatus',false,{onlineStatus:onlineStatus,allowSounds:allowSounds},succeededCallback,failedCallback,userContext); },
GetStatus:function(userId,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'GetStatus',false,{userId:userId},succeededCallback,failedCallback,userContext); }}
IChatService.registerClass('IChatService',Sys.Net.WebServiceProxy);
IChatService._staticInstance = new IChatService();
IChatService.set_path = function(value) { IChatService._staticInstance.set_path(value); }
IChatService.get_path = function() { return IChatService._staticInstance.get_path(); }
IChatService.set_timeout = function(value) { IChatService._staticInstance.set_timeout(value); }
IChatService.get_timeout = function() { return IChatService._staticInstance.get_timeout(); }
IChatService.set_defaultUserContext = function(value) { IChatService._staticInstance.set_defaultUserContext(value); }
IChatService.get_defaultUserContext = function() { return IChatService._staticInstance.get_defaultUserContext(); }
IChatService.set_defaultSucceededCallback = function(value) { IChatService._staticInstance.set_defaultSucceededCallback(value); }
IChatService.get_defaultSucceededCallback = function() { return IChatService._staticInstance.get_defaultSucceededCallback(); }
IChatService.set_defaultFailedCallback = function(value) { IChatService._staticInstance.set_defaultFailedCallback(value); }
IChatService.get_defaultFailedCallback = function() { return IChatService._staticInstance.get_defaultFailedCallback(); }
IChatService.set_enableJsonp = function(value) { IChatService._staticInstance.set_enableJsonp(value); }
IChatService.get_enableJsonp = function() { return IChatService._staticInstance.get_enableJsonp(); }
IChatService.set_jsonpCallbackParameter = function(value) { IChatService._staticInstance.set_jsonpCallbackParameter(value); }
IChatService.get_jsonpCallbackParameter = function() { return IChatService._staticInstance.get_jsonpCallbackParameter(); }
IChatService.set_path("http://www.myonlineband.com/Services/MobChatService.svc");
IChatService.GetAllChatRooms= function(onSuccess,onFailed,userContext) {IChatService._staticInstance.GetAllChatRooms(onSuccess,onFailed,userContext); }
IChatService.CreateChatRoom= function(chatType,chatRoomId,onSuccess,onFailed,userContext) {IChatService._staticInstance.CreateChatRoom(chatType,chatRoomId,onSuccess,onFailed,userContext); }
IChatService.GetChatRoom= function(chatRoomID,onSuccess,onFailed,userContext) {IChatService._staticInstance.GetChatRoom(chatRoomID,onSuccess,onFailed,userContext); }
IChatService.GetPublicChatRoom= function(onSuccess,onFailed,userContext) {IChatService._staticInstance.GetPublicChatRoom(onSuccess,onFailed,userContext); }
IChatService.DestroyChatRoom= function(roomID,onSuccess,onFailed,userContext) {IChatService._staticInstance.DestroyChatRoom(roomID,onSuccess,onFailed,userContext); }
IChatService.DestroyAll= function(onSuccess,onFailed,userContext) {IChatService._staticInstance.DestroyAll(onSuccess,onFailed,userContext); }
IChatService.JoinChatRoom= function(chatRoomID,onSuccess,onFailed,userContext) {IChatService._staticInstance.JoinChatRoom(chatRoomID,onSuccess,onFailed,userContext); }
IChatService.KickParticipant= function(participant,chatRoomID,onSuccess,onFailed,userContext) {IChatService._staticInstance.KickParticipant(participant,chatRoomID,onSuccess,onFailed,userContext); }
IChatService.GetAllChatParticipants= function(chatRoomID,onSuccess,onFailed,userContext) {IChatService._staticInstance.GetAllChatParticipants(chatRoomID,onSuccess,onFailed,userContext); }
IChatService.GetNewChatParticipants= function(chatRoomID,lastChecked,onSuccess,onFailed,userContext) {IChatService._staticInstance.GetNewChatParticipants(chatRoomID,lastChecked,onSuccess,onFailed,userContext); }
IChatService.SendMessage= function(chatRoomID,message,onSuccess,onFailed,userContext) {IChatService._staticInstance.SendMessage(chatRoomID,message,onSuccess,onFailed,userContext); }
IChatService.SendAndRecieve= function(chatRoomID,lastRecieved,userId,messages,onSuccess,onFailed,userContext) {IChatService._staticInstance.SendAndRecieve(chatRoomID,lastRecieved,userId,messages,onSuccess,onFailed,userContext); }
IChatService.getAllMessages= function(chatRoomId,onSuccess,onFailed,userContext) {IChatService._staticInstance.getAllMessages(chatRoomId,onSuccess,onFailed,userContext); }
IChatService.getNewMessages= function(chatRoomId,lastRecieved,userId,onSuccess,onFailed,userContext) {IChatService._staticInstance.getNewMessages(chatRoomId,lastRecieved,userId,onSuccess,onFailed,userContext); }
IChatService.CleanUp= function(onSuccess,onFailed,userContext) {IChatService._staticInstance.CleanUp(onSuccess,onFailed,userContext); }
IChatService.ExitChatRoom= function(chatRoomId,onSuccess,onFailed,userContext) {IChatService._staticInstance.ExitChatRoom(chatRoomId,onSuccess,onFailed,userContext); }
IChatService.UpdateStatus= function(onlineStatus,allowSounds,onSuccess,onFailed,userContext) {IChatService._staticInstance.UpdateStatus(onlineStatus,allowSounds,onSuccess,onFailed,userContext); }
IChatService.GetStatus= function(userId,onSuccess,onFailed,userContext) {IChatService._staticInstance.GetStatus(userId,onSuccess,onFailed,userContext); }
var gtc = Sys.Net.WebServiceProxy._generateTypedConstructor;
Type.registerNamespace('CilibertiEnterprises.InstantChat.Domain.Model');
if (typeof(CilibertiEnterprises.InstantChat.Domain.Model.ChatRoom) === 'undefined') {
CilibertiEnterprises.InstantChat.Domain.Model.ChatRoom=gtc("ChatRoom:http://schemas.datacontract.org/2004/07/CilibertiEnterprises.InstantChat.Domain.Model");
CilibertiEnterprises.InstantChat.Domain.Model.ChatRoom.registerClass('CilibertiEnterprises.InstantChat.Domain.Model.ChatRoom');
}
if (typeof(CilibertiEnterprises.InstantChat.Domain.Model.ChatMessage) === 'undefined') {
CilibertiEnterprises.InstantChat.Domain.Model.ChatMessage=gtc("ChatMessage:http://schemas.datacontract.org/2004/07/CilibertiEnterprises.InstantChat.Domain.Model");
CilibertiEnterprises.InstantChat.Domain.Model.ChatMessage.registerClass('CilibertiEnterprises.InstantChat.Domain.Model.ChatMessage');
}
if (typeof(CilibertiEnterprises.InstantChat.Domain.Model.ChatParticipant) === 'undefined') {
CilibertiEnterprises.InstantChat.Domain.Model.ChatParticipant=gtc("ChatParticipant:http://schemas.datacontract.org/2004/07/CilibertiEnterprises.InstantChat.Domain.Model");
CilibertiEnterprises.InstantChat.Domain.Model.ChatParticipant.registerClass('CilibertiEnterprises.InstantChat.Domain.Model.ChatParticipant');
}
if (typeof(CilibertiEnterprises.InstantChat.Domain.Model.ChatPreferances) === 'undefined') {
CilibertiEnterprises.InstantChat.Domain.Model.ChatPreferances=gtc("ChatPreferances:http://schemas.datacontract.org/2004/07/CilibertiEnterprises.InstantChat.Domain.Model");
CilibertiEnterprises.InstantChat.Domain.Model.ChatPreferances.registerClass('CilibertiEnterprises.InstantChat.Domain.Model.ChatPreferances');
}
if (typeof(CilibertiEnterprises.InstantChat.Domain.Model.ChatRoomRights) === 'undefined') {
CilibertiEnterprises.InstantChat.Domain.Model.ChatRoomRights = function() { throw Error.invalidOperation(); }
CilibertiEnterprises.InstantChat.Domain.Model.ChatRoomRights.prototype = {None: 0,ReadOnly: 1,TextOnly: 2,FullAccess: 3,Moderator: 4}
CilibertiEnterprises.InstantChat.Domain.Model.ChatRoomRights.registerEnum('CilibertiEnterprises.InstantChat.Domain.Model.ChatRoomRights', true);
}
if (typeof(CilibertiEnterprises.InstantChat.Domain.Model.MessageFormat) === 'undefined') {
CilibertiEnterprises.InstantChat.Domain.Model.MessageFormat = function() { throw Error.invalidOperation(); }
CilibertiEnterprises.InstantChat.Domain.Model.MessageFormat.prototype = {Text: 0,Image: 1,Audio: 2,Video: 3,ChordChart: 4,Link: 5,YouTube: 6,WhiteBoard: 7}
CilibertiEnterprises.InstantChat.Domain.Model.MessageFormat.registerEnum('CilibertiEnterprises.InstantChat.Domain.Model.MessageFormat', true);
}
if (typeof(CilibertiEnterprises.InstantChat.Domain.Model.ChatRoomType) === 'undefined') {
CilibertiEnterprises.InstantChat.Domain.Model.ChatRoomType = function() { throw Error.invalidOperation(); }
CilibertiEnterprises.InstantChat.Domain.Model.ChatRoomType.prototype = {MembersOnly: 0,Private: 1,Public: 2}
CilibertiEnterprises.InstantChat.Domain.Model.ChatRoomType.registerEnum('CilibertiEnterprises.InstantChat.Domain.Model.ChatRoomType', true);
}

