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

Public Types

enum  eShareType { Everybody, Nobody, Friends }
 

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 (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

Combu.UserFile.UserFile ( )

Initializes a new instance of the UserFile class.

Combu.UserFile.UserFile ( string  jsonString)

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

Parameters
jsonStringJSON formatted string.
Combu.UserFile.UserFile ( Hashtable  hash)

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

Parameters
hashHash.

Member Function Documentation

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

Deletes this UserFile from server.

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

Deletes the specified File from server.

Parameters
idFileIdentifier file.
callbackCallback.
void Combu.UserFile.Download ( Action< byte[]>  callback)

Download the bytes from the url.

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

Initialize the object from a hashtable.

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

Initialize the object from a JSON formatted string.

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

Increase the Like count of this UserFile.

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

Increase the Like count of a UserFile.

Parameters
idFileIdentifier file.
callbackCallback.
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.
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.
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() 
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.
virtual void Combu.UserFile.View ( Action< bool, string >  callback)
virtual

Increase the View count of this UserFile.

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

Increase the View count of a UserFile.

Parameters
idFileIdentifier file.
callbackCallback.
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.

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