Combu  2.1.14
Unity API Documentation
Public Member Functions | Static Public Member Functions | Public Attributes | Static Protected Member Functions | Properties | List of all members
Combu.Mail Class Reference

Public Member Functions

virtual void FromJson (string jsonString)
 Initialize the object from a JSON formatted string. More...
 
virtual void FromHashtable (Hashtable hash)
 Initialize the object from a hashtable. More...
 
void Read (Action< bool, string > callback)
 Mark this mail as read. More...
 
void Unread (Action< bool, string > callback)
 Mark this mail as read. More...
 
virtual void Delete (Action< bool, string > callback)
 Delete this instance. More...
 

Static Public Member Functions

static void Load (eMailList listType, int pageNumber, int limit, System.Action< Mail[], int, int, string > callback)
 
static void Load (eMailList listType, long idRecipient, long idSender, long idGroup, int pageNumber, int limit, System.Action< Mail[], int, int, string > callback)
 
static void Load< T > (eMailList listType, long idRecipient, long idSender, long idGroup, int pageNumber, int limit, System.Action< T[], int, int, string > callback)
 Load mails list from specified page and number of records. More...
 
static void Send (long recipientId, string subject, string message, bool isPublic, System.Action< bool, string > callback)
 Sends a mail to a user. More...
 
static void Send (long[] recipientsId, string subject, string message, bool isPublic, System.Action< bool, string > callback)
 Sends the mail to multiple users. More...
 
static void Send (string recipientUsername, string subject, string message, bool isPublic, System.Action< bool, string > callback)
 Sends a mail to a user. More...
 
static void Send (string[] recipientsUsername, string subject, string message, bool isPublic, System.Action< bool, string > callback)
 Sends the mail to multiple users. More...
 
static void SendMailToGroup (long groupId, string subject, string message, bool isPublic, System.Action< bool, string > callback)
 Sends the mail to group. More...
 
static void Read (long idMail, Action< bool, string > callback)
 Mark a single mail as read. More...
 
static void Read (long[] idSenders, long[] idGroups, Action< bool, string > callback)
 Mark a set of mails as read. More...
 
static void Unread (long idMail, Action< bool, string > callback)
 Mark a single mail as read. More...
 
static void Delete (long idMail, Action< bool, string > callback)
 Delete the specified Mail. More...
 
static void LoadConversations (Action< ArrayList, int, string > callback)
 Loads the conversations (list of senders as both users and groups). More...
 
static void Count (long[] idUsers, long[] idGroups, Action< MailCount[], string > callback)
 Loads the read/unread messages from list of senders and groups. More...
 

Public Attributes

long id = 0
 
DateTime sendDate = DateTime.MinValue
 
DateTime readDate = DateTime.MinValue
 
string subject = ""
 
string message = ""
 
bool isPublic = false
 
User fromUser
 
User toUser
 
long idGroup = 0
 
UserGroup toGroup
 

Static Protected Member Functions

static void Send (long[] recipientsId, string[] recipientsUsername, long recipientGroupId, string subject, string message, bool isPublic, System.Action< bool, string > callback)
 Sends the mail. More...
 
static void Read (long idMail, long[] idSenders, long[] idGroups, Action< bool, string > callback)
 Mark a single mail or a set of mails as read. More...
 

Properties

bool isRead [get]
 

Member Function Documentation

static void Combu.Mail.Count ( long[]  idUsers,
long[]  idGroups,
Action< MailCount[], string >  callback 
)
static

Loads the read/unread messages from list of senders and groups.

virtual void Combu.Mail.Delete ( Action< bool, string >  callback)
virtual

Delete this instance.

static void Combu.Mail.Delete ( long  idMail,
Action< bool, string >  callback 
)
static

Delete the specified Mail.

Parameters
idMailIdentifier mail.
callbackCallback.
virtual void Combu.Mail.FromHashtable ( Hashtable  hash)
virtual

Initialize the object from a hashtable.

Parameters
hashHash.
virtual void Combu.Mail.FromJson ( string  jsonString)
virtual

Initialize the object from a JSON formatted string.

Parameters
jsonStringJson string.
static void Combu.Mail.Load< T > ( eMailList  listType,
long  idRecipient,
long  idSender,
long  idGroup,
int  pageNumber,
int  limit,
System.Action< T[], int, int, string >  callback 
)
static

Load mails list from specified page and number of records.

Parameters
pageNumberPage number.
limitLimit.
Template Parameters
TType of returned objects.
Type Constraints
T :Mail 
T :new() 
static void Combu.Mail.LoadConversations ( Action< ArrayList, int, string >  callback)
static

Loads the conversations (list of senders as both users and groups).

void Combu.Mail.Read ( Action< bool, string >  callback)

Mark this mail as read.

Parameters
callbackCallback.
static void Combu.Mail.Read ( long  idMail,
Action< bool, string >  callback 
)
static

Mark a single mail as read.

Parameters
idMailIdentifier mail.
callbackCallback.
static void Combu.Mail.Read ( long[]  idSenders,
long[]  idGroups,
Action< bool, string >  callback 
)
static

Mark a set of mails as read.

Parameters
idSendersIdentifier senders.
idGroupsIdentifier groups.
static void Combu.Mail.Read ( long  idMail,
long[]  idSenders,
long[]  idGroups,
Action< bool, string >  callback 
)
staticprotected

Mark a single mail or a set of mails as read.

Parameters
idMailIdentifier mail.
idSendersIdentifier senders.
idGroupsIdentifier groups.
callbackCallback.
static void Combu.Mail.Send ( long  recipientId,
string  subject,
string  message,
bool  isPublic,
System.Action< bool, string >  callback 
)
static

Sends a mail to a user.

Parameters
idDestinationIdentifier Id of the destination user.
subjectSubject.
messageMessage.
isPublicIf set to true is public.
static void Combu.Mail.Send ( long[]  recipientsId,
string  subject,
string  message,
bool  isPublic,
System.Action< bool, string >  callback 
)
static

Sends the mail to multiple users.

Parameters
recipientsIdRecipients identifier.
subjectSubject.
messageMessage.
isPublicIf set to true is public.
static void Combu.Mail.Send ( string  recipientUsername,
string  subject,
string  message,
bool  isPublic,
System.Action< bool, string >  callback 
)
static

Sends a mail to a user.

Parameters
usernameDestinationUsername of the destination user.
subjectSubject.
messageMessage.
isPublicIf set to true is public.
static void Combu.Mail.Send ( string[]  recipientsUsername,
string  subject,
string  message,
bool  isPublic,
System.Action< bool, string >  callback 
)
static

Sends the mail to multiple users.

Parameters
recipientsUsernameRecipients username.
subjectSubject.
messageMessage.
isPublicIf set to true is public.
static void Combu.Mail.Send ( long[]  recipientsId,
string[]  recipientsUsername,
long  recipientGroupId,
string  subject,
string  message,
bool  isPublic,
System.Action< bool, string >  callback 
)
staticprotected

Sends the mail.

Parameters
recipientsIdRecipients identifier.
recipientsUsernameRecipients username.
recipientGroupIdRecipient group identifier.
subjectSubject.
messageMessage.
isPublicIf set to true is public.
static void Combu.Mail.SendMailToGroup ( long  groupId,
string  subject,
string  message,
bool  isPublic,
System.Action< bool, string >  callback 
)
static

Sends the mail to group.

Parameters
groupIdGroup identifier.
subjectSubject.
messageMessage.
isPublicIf set to true is public.
void Combu.Mail.Unread ( Action< bool, string >  callback)

Mark this mail as read.

Parameters
callbackCallback.
static void Combu.Mail.Unread ( long  idMail,
Action< bool, string >  callback 
)
static

Mark a single mail as read.

Parameters
idMailIdentifier mail.
callbackCallback.

The documentation for this class was generated from the following file: