/*
 * 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 "flockIMediaWebService.idl"
#include "flockIListener.idl"
#include "nsIDOMHTMLElement.idl"
#include "nsIWritablePropertyBag2.idl"

/**
 * Represents a web service that supports browsing of streams or collections of
 * rich media (eg. photos, video).
 *
 * @see flockIMediaWebService
 */
[scriptable, uuid(8ab8eb98-ce68-4a8b-b4e0-b6d4ef9b1dc2)]
interface flockIMediaEmbedWebService : flockIMediaWebService {

  /**
   * Determine if the passed in URL represents a media stream for this
   * particular flockIMediaService.
   *
   * @param aUrl The URL to evaluate.
   * @returns true if the passed in URL represents a media stream for this
   *          particular flockIMediaService.
   */
  boolean checkIsStreamUrl(in AString aUrl);

  /**
   * Generate a media query from the passed in URL.
   * @param aUrl The URL to derive the media query from.
   * @param aListener The flockIListener to send the results.
   */
   void getMediaQueryFromURL(in AString aUrl, in flockIListener aFlockListener);

  /**
   * Retrieve the content URL and title.
   *
   * @param aSrc Source element.
   * @param aProp Container for retrieved property results.
   * @returns true if a service handled the request.
   */
  boolean getSharingContent(in nsIDOMHTMLElement aSrc,
                            in nsIWritablePropertyBag2 aProp);
};
