var Messaging=function() {
Messaging.initializeBase(this);
this._timeout = 0;
this._userContext = null;
this._succeeded = null;
this._failed = null;
}
Messaging.prototype={
SendMessage:function(from,to,subject,Body,currentProfileGuid,succeededCallback, failedCallback, userContext) {
return this._invoke(Messaging.get_path(), 'SendMessage',false,{from:from,to:to,subject:subject,Body:Body,currentProfileGuid:currentProfileGuid},succeededCallback,failedCallback,userContext); },
getMessageForList:function(messageID,UserId,profileGuid,succeededCallback, failedCallback, userContext) {
return this._invoke(Messaging.get_path(), 'getMessageForList',false,{messageID:messageID,UserId:UserId,profileGuid:profileGuid},succeededCallback,failedCallback,userContext); },
getMessageIDs:function(userId,profileGuid,incoming,succeededCallback, failedCallback, userContext) {
return this._invoke(Messaging.get_path(), 'getMessageIDs',false,{userId:userId,profileGuid:profileGuid,incoming:incoming},succeededCallback,failedCallback,userContext); },
getMessageCounts:function(userId,profileGuid,bInboxCount,bSentCount,bInboxNewCount,succeededCallback, failedCallback, userContext) {
return this._invoke(Messaging.get_path(), 'getMessageCounts',false,{userId:userId,profileGuid:profileGuid,bInboxCount:bInboxCount,bSentCount:bSentCount,bInboxNewCount:bInboxNewCount},succeededCallback,failedCallback,userContext); },
getMessage:function(messageId,userId,profileGuid,forInbox,succeededCallback, failedCallback, userContext) {
return this._invoke(Messaging.get_path(), 'getMessage',false,{messageId:messageId,userId:userId,profileGuid:profileGuid,forInbox:forInbox},succeededCallback,failedCallback,userContext); },
deleteMessage:function(messageId,userID,profileGuid,succeededCallback, failedCallback, userContext) {
return this._invoke(Messaging.get_path(), 'deleteMessage',false,{messageId:messageId,userID:userID,profileGuid:profileGuid},succeededCallback,failedCallback,userContext); },
getContacts:function(userId,profileGuid,succeededCallback, failedCallback, userContext) {
return this._invoke(Messaging.get_path(), 'getContacts',false,{userId:userId,profileGuid:profileGuid},succeededCallback,failedCallback,userContext); },
GetMessages:function(userId,forInbox,pageNumber,pageSize,sort,sortDirection,succeededCallback, failedCallback, userContext) {
return this._invoke(Messaging.get_path(), 'GetMessages',false,{userId:userId,forInbox:forInbox,pageNumber:pageNumber,pageSize:pageSize,sort:sort,sortDirection:sortDirection},succeededCallback,failedCallback,userContext); },
MarkMessageAsRead:function(messageId,succeededCallback, failedCallback, userContext) {
return this._invoke(Messaging.get_path(), 'MarkMessageAsRead',false,{messageId:messageId},succeededCallback,failedCallback,userContext); }}
Messaging.registerClass('Messaging',Sys.Net.WebServiceProxy);
Messaging._staticInstance = new Messaging();
Messaging.set_path = function(value) { Messaging._staticInstance._path = value; }
Messaging.get_path = function() { return Messaging._staticInstance._path; }
Messaging.set_timeout = function(value) { Messaging._staticInstance._timeout = value; }
Messaging.get_timeout = function() { return Messaging._staticInstance._timeout; }
Messaging.set_defaultUserContext = function(value) { Messaging._staticInstance._userContext = value; }
Messaging.get_defaultUserContext = function() { return Messaging._staticInstance._userContext; }
Messaging.set_defaultSucceededCallback = function(value) { Messaging._staticInstance._succeeded = value; }
Messaging.get_defaultSucceededCallback = function() { return Messaging._staticInstance._succeeded; }
Messaging.set_defaultFailedCallback = function(value) { Messaging._staticInstance._failed = value; }
Messaging.get_defaultFailedCallback = function() { return Messaging._staticInstance._failed; }
Messaging.set_path("/_services/Messaging.asmx");
Messaging.SendMessage= function(from,to,subject,Body,currentProfileGuid,onSuccess,onFailed,userContext) {Messaging._staticInstance.SendMessage(from,to,subject,Body,currentProfileGuid,onSuccess,onFailed,userContext); }
Messaging.getMessageForList= function(messageID,UserId,profileGuid,onSuccess,onFailed,userContext) {Messaging._staticInstance.getMessageForList(messageID,UserId,profileGuid,onSuccess,onFailed,userContext); }
Messaging.getMessageIDs= function(userId,profileGuid,incoming,onSuccess,onFailed,userContext) {Messaging._staticInstance.getMessageIDs(userId,profileGuid,incoming,onSuccess,onFailed,userContext); }
Messaging.getMessageCounts= function(userId,profileGuid,bInboxCount,bSentCount,bInboxNewCount,onSuccess,onFailed,userContext) {Messaging._staticInstance.getMessageCounts(userId,profileGuid,bInboxCount,bSentCount,bInboxNewCount,onSuccess,onFailed,userContext); }
Messaging.getMessage= function(messageId,userId,profileGuid,forInbox,onSuccess,onFailed,userContext) {Messaging._staticInstance.getMessage(messageId,userId,profileGuid,forInbox,onSuccess,onFailed,userContext); }
Messaging.deleteMessage= function(messageId,userID,profileGuid,onSuccess,onFailed,userContext) {Messaging._staticInstance.deleteMessage(messageId,userID,profileGuid,onSuccess,onFailed,userContext); }
Messaging.getContacts= function(userId,profileGuid,onSuccess,onFailed,userContext) {Messaging._staticInstance.getContacts(userId,profileGuid,onSuccess,onFailed,userContext); }
Messaging.GetMessages= function(userId,forInbox,pageNumber,pageSize,sort,sortDirection,onSuccess,onFailed,userContext) {Messaging._staticInstance.GetMessages(userId,forInbox,pageNumber,pageSize,sort,sortDirection,onSuccess,onFailed,userContext); }
Messaging.MarkMessageAsRead= function(messageId,onSuccess,onFailed,userContext) {Messaging._staticInstance.MarkMessageAsRead(messageId,onSuccess,onFailed,userContext); }
var gtc = Sys.Net.WebServiceProxy._generateTypedConstructor;
Type.registerNamespace('SpotLocal.Library.Messaging');
if (typeof(SpotLocal.Library.Messaging.Contact) === 'undefined') {
SpotLocal.Library.Messaging.Contact=gtc("SpotLocal.Library.Messaging.Contact");
SpotLocal.Library.Messaging.Contact.registerClass('SpotLocal.Library.Messaging.Contact');
}
if (typeof(SpotLocal.Library.Messaging.Message) === 'undefined') {
SpotLocal.Library.Messaging.Message=gtc("SpotLocal.Library.Messaging.Message");
SpotLocal.Library.Messaging.Message.registerClass('SpotLocal.Library.Messaging.Message');
}
