phpDocumentor NokiaUpload
Classes
[ class tree: NokiaUpload ] [ index: NokiaUpload ] [ all elements ]

Class: ImageUploadHelper

Source Location: /modules/nokiaupload/classes/ImageUploadHelper.class

Class ImageUploadHelper

Method Summary
void   createMobileUserGroup()  
array   createNewDirectory()   New Directory.
void   createUploadAlbum()  
array   doLogin()   Log user in.
array   doUpload()   Upload a picture to Gallery from a mobile phone.
array   getDirectoryListing()   Directory listing.
array   getRSCapabilities()   Remote Storage Capabilities.
void   logRequest()   Write the contents of _POST and _GET to debug log.
GalleryStatus   setAlbumPermissions()   Set permissions for the mobile upload album. Only members of Mobile Users group can add data and albums to Phone Uploads album. Admins can do everything and other users can only view items. First we remove all possible inherited permissions and then add only the permissions we want.

[ Top ]
Methods
createMobileUserGroup  [line 475]

  void createMobileUserGroup( $name  )

Parameters:
   $name: 


[ Top ]
createNewDirectory  [line 210]

  array createNewDirectory( )

New Directory.

Creates a subalbum under the album whose id client gives. If no id is given then uses the 'id.uploadAlbum' module parameter as the parent id. Returns the id of the new album.


API Tags:
Return:  ('success', 'id')


[ Top ]
createUploadAlbum  [line 509]

  void createUploadAlbum( $title, $parentId  )

Parameters:
   $title: 
   $parentId: 


[ Top ]
doLogin  [line 74]

  array doLogin( )

Log user in.

Gets username and password from request and checks that they are valid. Returns an address for the remote storage capabilities query, name of the sessionId parameter and its value. If remote storage capabilities are available returns them as well to save the client from one extra call. Adds user into the mobile users group if s/he isn't yet a member of it.


API Tags:
Return:  ('success', 'rsurl', 'sessionidparam', 'sessionid', 'capabilities')


[ Top ]
doUpload  [line 336]

  array doUpload( )

Upload a picture to Gallery from a mobile phone.

Returns the available space on the server after the upload. Currently this value is (a random) 10 000 000 bytes.


API Tags:
Return:  ('success', 'spaceleft')


[ Top ]
getDirectoryListing  [line 426]

  array getDirectoryListing( )

Directory listing.

Returns all albums where user has core.addDataItem permission.


API Tags:
Return:  ('success', 'albums' => array (array('id', 'parentid', 'name'), ..))


[ Top ]
getRSCapabilities  [line 174]

  array getRSCapabilities( )

Remote Storage Capabilities.

Returns the remote storage capabilities in "print-ready" form. Currently supported are: 'Create New Directory', 'Upload' and 'Retrieve Directory Listing'.


API Tags:
Return:  remote storage capabilities


[ Top ]
logRequest  [line 634]

  void logRequest( [string $message = '']  )

Write the contents of _POST and _GET to debug log.

Parameters:
string   $message:  optional message


[ Top ]
setAlbumPermissions  [line 586]

  GalleryStatus setAlbumPermissions( int $albumId, int $groupId  )

Set permissions for the mobile upload album. Only members of Mobile Users group can add data and albums to Phone Uploads album. Admins can do everything and other users can only view items. First we remove all possible inherited permissions and then add only the permissions we want.

Parameters:
int   $albumId: 
int   $groupId:  id of mobile users group

API Tags:
Return:  a status code


[ Top ]

Documentation generated on Fri, 08 Oct 2010 05:20:00 -0700 by phpDocumentor 1.3.0RC6