httpserver.js 1.64 KB
/*
 *
 * ADOBE CONFIDENTIAL
 * __________________
 *
 *  Copyright 2017 Adobe Systems Incorporated
 *  All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Adobe Systems Incorporated and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Adobe Systems Incorporated and its
 * suppliers and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Adobe Systems Incorporated.
 */
/* istanbul ignore next */
define('screens/player/firmware/httpserver/spi/httpserver', function() {
    'use strict';

    /**
     * Defines the HttpServer SPI.
     *
     * @interface HttpServerSpi
     */
    return Object.freeze({

        /**
         * The service name
         * @property serviceName
         * @memberof HttpServerSpi
         * @constant
         */
        serviceName: 'com.adobe.cq.screens.player.httpserver.spi.httpserver',

        /**
         * Serves the content from the given path (starts the server if needed).
         * @memberof HttpServerSpi
         *
         * @param {String} path The path to the content.
         *
         * @return {Promise<string>} A promise that is fulfilled with the server URL.
         */
        serve: function(path) { return Promise.reject(); },

        /**
         * Stops the server.
         * @memberof HttpServerSpi
         *
         * @return {Promise} A Promise that the server is stopped.
         */
        stop: function() { return Promise.reject(); }

    });
});