webengine/osswebengine/WebKit/s60/plugins/PluginStreamLoaderClient.h
changeset 0 dd21522fd290
child 36 0ed94ceaa377
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Loads the plugin content
       
    15 *
       
    16 *//*
       
    17 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
    18 * All rights reserved.
       
    19 * This component and the accompanying materials are made available
       
    20 * under the terms of the License "Eclipse Public License v1.0"
       
    21 * which accompanies this distribution, and is available
       
    22 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
    23 *
       
    24 * Initial Contributors:
       
    25 * Nokia Corporation - initial contribution.
       
    26 *
       
    27 * Contributors:
       
    28 *
       
    29 * Description:  
       
    30 *
       
    31 */
       
    32 
       
    33 #ifndef __PLUGINLOADER_H__
       
    34 #define __PLUGINLOADER_H__
       
    35 
       
    36 #include <wtf/RefPtr.h>
       
    37 
       
    38 class PluginSkin;
       
    39 class PluginStream;
       
    40 
       
    41 namespace WebCore {
       
    42 
       
    43 class Frame;
       
    44 class String;
       
    45 class ResourceError;
       
    46 struct ResourceRequest;
       
    47 class ResourceResponse;  
       
    48 class NetscapePlugInStreamLoader;
       
    49 
       
    50 class NetscapePlugInStreamLoaderClient
       
    51 {
       
    52 
       
    53 public:
       
    54     static NetscapePlugInStreamLoaderClient* NewL(const String& url, PluginSkin* pluginskin, Frame* frame, void* notifydata = 0);
       
    55     static NetscapePlugInStreamLoaderClient* NewL(const ResourceRequest& request, PluginSkin* pluginskin, Frame* frame, void* notifydata=0);
       
    56     virtual ~NetscapePlugInStreamLoaderClient();             
       
    57     
       
    58     void start();    
       
    59     void stop();
       
    60     void cancelWithError(const ResourceError& error);
       
    61 
       
    62 public:
       
    63     void didReceiveResponse(const ResourceResponse&);
       
    64     void didReceiveData(const char*, int, long long);
       
    65     void didFinishLoading();
       
    66     void didFail(const ResourceError& error);
       
    67     void didCancel(const ResourceError& error);
       
    68     
       
    69 private:
       
    70     void ConstructL(const String& url, PluginSkin* pluginskin, Frame* frame, void* notifydata = 0);
       
    71     void ConstructL(const ResourceRequest& request, PluginSkin* pluginskin, Frame* frame, void* notifydata=0);
       
    72 
       
    73     NetscapePlugInStreamLoaderClient();
       
    74 
       
    75 private:
       
    76     Frame* m_frame;
       
    77     PluginStream* m_pluginstream;
       
    78     ResourceRequest* m_request;              
       
    79     NetscapePlugInStreamLoader* m_loader;
       
    80     int m_error;
       
    81     
       
    82 };
       
    83 
       
    84 } //namespace
       
    85 
       
    86 #endif