/*
 * BEGIN FLOCK GPL
 *
 * Copyright Flock Inc. 2005-2008
 * 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 "flockIMediaWebService.idl"
#include "flockIListener.idl"
#include "flockIPhotoUpload.idl"

/**
 * Represents a web service that supports uploading of
 * rich media (eg. photos, video).
 *
 * More documentation here:
 * http://wiki.flock.com/index.php?title=Danphe:AccountsAndServices
 *
 * @see flockIMediaWebServiceAccount
 * @see flockIMediaUploadAccount
 */
[scriptable, uuid(eb57a51a-82c2-4bf6-af06-06379fe694d9)]
interface flockIMediaUploadWebService : flockIMediaWebService {
  /**
   * Query the server to get information about the current user's account
   * @param aListener (in) the listener used to pass the result.
   *                  aListener.onSuccess(result, topic) will be return,
   *                  only result holding a relevant value.
   *
   *                  result is a nsIPropertyBag2 holding the following values:
   *                  @li boolean isPremium;
   *                  @li string maxFileSize;
   *                  @li string maxSpace;
   *                  @li string usageUnits;
   *                  @li string usedSpace;
   *                  @li string username;
   */
  void getAccountStatus(in flockIListener aListener);

  /**
   * Gets albums that are only upload endpoints.
   * @param aListener (in) Specifies a callback listener
   * @param aUsername (in) Specifies a username to operate the search as
   */
  void getAlbumsForUpload(in flockIListener aListener, in AString aUsername);

  void createAlbum(in flockIListener aListener, in AString aAlbumName);

  boolean supportsFeature(in AString aFeature);

  void upload(in flockIPhotoUploadAPIListener aListener,
              in flockIPhotoUpload aUpload,
              in AString aFilename);
};

/**
 * Represents a web service account that supports uploading of rich media (eg.
 * photos, video).
 *
 * @see flockIMediaWebService
 * @see flockIMediaWebServiceAccount
 */
[scriptable, uuid(D610CB10-74E1-11DB-9FE1-0800200C9A66)]
interface flockIMediaUploadAccount : flockIMediaWebServiceAccount {
};
