2
* Copyright 2008 Anssi Piirainen
4
* This file is part of FlowPlayer.
6
* FlowPlayer is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
11
* FlowPlayer is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with FlowPlayer. If not, see <http://www.gnu.org/licenses/>.
20
package org.flowplayer.controller {
21
import flash.events.NetStatusEvent;
22
import org.flowplayer.model.Clip;
27
public interface ConnectionProvider {
29
function set connectionClient(client:Object):void;
32
* Sets a listener that gets called if the connection fails.
33
* The function must have a parameter of type NetStatusEvent.
35
function set onFailure(listener:Function):void;
38
* Connects to the specified URL.
41
* @param successListener
42
* @param objectEncoding to be used in NetConnection.objectEncoding
46
function connect(provider:StreamProvider, clip:Clip, successListener:Function, objectEncoding: uint, connectionArgs:Array):void;
49
* Called when a netStatusEvent is received.
51
* @return if false, the streamProvider will ignore this event and will not send any events for it
53
function handeNetStatusEvent(event:NetStatusEvent):Boolean;