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

Public Member Functions

 UserFile ()
 Initializes a new instance of the UserFile class. More...
 
 UserFile (string jsonString)
 Initializes a new instance of the UserFile class from a JSON formatted string. More...
 
 UserFile (Hashtable hash)
 Initializes a new instance of the UserFile class from a Hashtable. More...
 
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...
 
virtual void Update (byte[] contents, Action< bool, string > callback)
 Update this file to server. More...
 
virtual void Delete (Action< bool, string > callback)
 Deletes this UserFile from server. More...
 
virtual void View (Action< bool, string > callback)
 Increase the View count of this UserFile. More...
 
virtual void Like (Action< bool, string > callback)
 Increase the Like count of this UserFile. More...
 
void Download (Action< byte[]> callback)
 Download the bytes from the url. More...
 

Static Public Member Functions

static void Load (long fileId, Action< UserFile, string > callback)
 Load the file file with the specified Id and callback. More...
 
static void Load (string userId, bool includeShared, int pageNumber, int countPerPage, Action< UserFile[], int, int, string > callback)
 Load the UserFiles with the specified userId, includeShared, pageNumber, countPerPage and callback. More...
 
static void Load< T > (string userId, bool includeShared, int pageNumber, int countPerPage, Action< UserFile[], int, int, string > callback)
 Load the UserFiles with the specified userId, includeShared, pageNumber, countPerPage and callback. More...
 
static void Delete (long idFile, Action< bool, string > callback)
 Deletes the specified File from server. More...
 
static void View (long idFile, Action< bool, string > callback)
 Increase the View count of a UserFile. More...
 
static void Like (long idFile, Action< bool, string > callback)
 Increase the Like count of a UserFile. More...
 

Public Attributes

string name = ""
 
string url = ""
 
eShareType sharing = eShareType.Nobody
 
Hashtable customData = new Hashtable()
 

Static Protected Member Functions

static void View (UserFile file, long idFile, Action< bool, string > callback)
 Increase the View count of a UserFile. More...
 
static void Like (UserFile file, long idFile, Action< bool, string > callback)
 Increase the Like count of a UserFile. More...
 

Properties

long id [get]
 
long idAccount [get]
 
int views [get]
 
int likes [get]
 

Constructor & Destructor Documentation

◆ UserFile() [1/3]

Combu.UserFile.UserFile ( )

Initializes a new instance of the UserFile class.

◆ UserFile() [2/3]

Combu.UserFile.UserFile ( string  jsonString)

Initializes a new instance of the UserFile class from a JSON formatted string.

Parameters
jsonStringJSON formatted string.

◆ UserFile() [3/3]

Combu.UserFile.UserFile ( Hashtable  hash)

Initializes a new instance of the UserFile class from a Hashtable.

Parameters
hashHash.

Member Function Documentation

◆ Delete() [1/2]

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

Deletes this UserFile from server.

Parameters
callbackCallback.

◆ Delete() [2/2]

static void Combu.UserFile.Delete ( long  idFile,
Action< bool, string >  callback 
)
static

Deletes the specified File from server.

Parameters
idFileIdentifier file.
callbackCallback.

◆ Download()

void Combu.UserFile.Download ( Action< byte[]>  callback)

Download the bytes from the url.

Parameters
callbackCallback.

◆ FromHashtable()

virtual void Combu.UserFile.FromHashtable ( Hashtable  hash)
virtual

Initialize the object from a hashtable.

Parameters
hashHash.

◆ FromJson()

virtual void Combu.UserFile.FromJson ( string  jsonString)
virtual

Initialize the object from a JSON formatted string.

Parameters
jsonStringJson string.

◆ Like() [1/3]

virtual void Combu.UserFile.Like ( Action< bool, string >  callback)
virtual

Increase the Like count of this UserFile.

Parameters
callbackCallback.

◆ Like() [2/3]

static void Combu.UserFile.Like ( long  idFile,
Action< bool, string >  callback 
)
static

Increase the Like count of a UserFile.

Parameters
idFileIdentifier file.
callbackCallback.

◆ Like() [3/3]

static void Combu.UserFile.Like ( UserFile  file,
long  idFile,
Action< bool, string >  callback 
)
staticprotected

Increase the Like count of a UserFile.

Parameters
fileFile.
idFileIdentifier file (if File is null).
callbackCallback.

◆ Load() [1/2]

static void Combu.UserFile.Load ( long  fileId,
Action< UserFile, string >  callback 
)
static

Load the file file with the specified Id and callback.

Parameters
fileIdFile identifier.
callbackCallback.

◆ Load() [2/2]

static void Combu.UserFile.Load ( string  userId,
bool  includeShared,
int  pageNumber,
int  countPerPage,
Action< UserFile[], int, int, string >  callback 
)
static

Load the UserFiles with the specified userId, includeShared, pageNumber, countPerPage and callback.

Parameters
userIdUser identifier.
includeSharedIf set to true include shared.
pageNumberPage number.
countPerPageCount per page.
callbackCallback.

◆ Load< T >()

static void Combu.UserFile.Load< T > ( string  userId,
bool  includeShared,
int  pageNumber,
int  countPerPage,
Action< UserFile[], int, int, string >  callback 
)
static

Load the UserFiles with the specified userId, includeShared, pageNumber, countPerPage and callback.

Parameters
userIdUser identifier.
includeSharedIf set to true include shared.
pageNumberPage number.
countPerPageCount per page.
callbackCallback.
Template Parameters
TType for UserFile.
Type Constraints
T :UserFile 
T :new() 

◆ Update()

virtual void Combu.UserFile.Update ( byte[]  contents,
Action< bool, string >  callback 
)
virtual

Update this file to server.

Parameters
contentsContents of the file to send.
callbackCallback.

◆ View() [1/3]

virtual void Combu.UserFile.View ( Action< bool, string >  callback)
virtual

Increase the View count of this UserFile.

Parameters
callbackCallback.

◆ View() [2/3]

static void Combu.UserFile.View ( long  idFile,
Action< bool, string >  callback 
)
static

Increase the View count of a UserFile.

Parameters
idFileIdentifier file.
callbackCallback.

◆ View() [3/3]

static void Combu.UserFile.View ( UserFile  file,
long  idFile,
Action< bool, string >  callback 
)
staticprotected

Increase the View count of a UserFile.

Parameters
fileFile.
idFileIdentifier file (if File is null).
callbackCallback.