/*
 * BEGIN FLOCK GPL
 *
 * Copyright Flock Inc. 2005-2009
 * http://flock.com
 *
 * This file may be used under the terms of the
 * GNU General Public License Version 2 or later (the "GPL"),
 * http://www.gnu.org/licenses/gpl.html
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * END FLOCK GPL
 */

#include "flockIListener.idl"
#include "flockIPhotoUpload.idl"
#include "flockIWebServiceAPI.idl"

[scriptable, uuid(cf0bf1de-914f-44ce-8967-39a6719a392e)]
interface flockIMyspaceAPI : flockITokenAPI {

  /**
   * Get the profile of a specified user.
   * @param aUid  UserID of the user
   * @param aListener  a flockIListener to use to return the results via
   *                   flockIListener#onSuccess, or any errors via
   *                   flockIListener#onError.
   */
  void getMyProfile(in AString aUid, in flockIListener aListener);

  /**
   * Get the indicators of a specified user.
   * @param aUid  UserID of the user
   * @param aListener  a flockIListener to use to return the indicators data
   *                   via flockIListener#onSuccess, or any errors via
   *                   flockIListener#onError.
   */
  void getMyIndicators(in AString aUid, in flockIListener aListener);

  /**
   * Get the friends of a specified user.
   * @param aUid  UserID of the user
   * @param aListener  a flockIListener to use to return the friends via
   *                   flockIListener#onSuccess, or any errors via
   *                   flockIListener#onError.
   */
  void getMyFriends(in AString aUid, in flockIListener aListener);

  /**
   * Get the albums of a specified user.
   * @param aUid  UserID of the user
   * @param aListener  a flockIListener to use to return the albums via
   *                   flockIListener#onSuccess, or any errors via
   *                   flockIListener#onError.
   */
  void getUserAlbums(in AString aUid, in flockIListener aListener);

  /**
   * Sets the status of a specified user.
   * @param aUid  UserID of the user
   * @param aStatusMessage  Status of the user
   * @param aListener  a flockIListener to use to return the albums via
   *                   flockIListener#onSuccess, or any errors via
   *                   flockIListener#onError.
   */
  void setMyStatus(in AString aUid,
                   in AString aStatusMessage,
                   in flockIListener aListener);

  /**
   * Upload photos to Myspace from the Flock Photo Uploader.
   *
   * @param aUploadListener (in) A flockIPhotoUploadAPIListener.
   * @param aFilename (in) An AString containing the full filename of the photo
   *                    to upload.
   * @param aParams (in) An nsIPropertyBag2 containing paramaters to pass to
   *                     flockIPhotoAPI#upload2.
   * @param aUpload (in) A flockIPhotoUpload.
   */ 
  void uploadPhotosViaUploader(in flockIPhotoUploadAPIListener aUploadListener,
                               in AString aFilename,
                               in nsIPropertyBag2 aParams,
                               in flockIPhotoUpload aUpload);

  /**
   * Create an album for this user
   *
   * @param aUid UserID of the user
   * @param aAlbumTitle (in) The title of the new album to create.
   * @param aFlockListener (in) A flockIListener which responds
   *                       flockIListener#onSuccess() with with the album that
   *                       was created.
   */
  void createAlbum(in AString aUid,
                   in AString aAlbumTitle,
                   in flockIListener aFlockListener);
};
