// Path: chameria-service/src/main/java/de/akquinet/chameria/services/BrowserService.java
// public interface BrowserService {
// 
//     public static final String SCROLLBAR_AS_NEEDED = "ScrollBarAsNeeded";
//     public static final String SCROLLBAR_ALWAYS_ON = "ScrollBarAlwaysOn";
//     public static final String SCROLLBAR_ALWAYS_OFF = "ScrollBarAlwaysOff";
// 
//     public boolean isFullScreen();
// 
//     public void setFullScreen(boolean fullscreen);
// 
//     public void setURL(String url);
// 
//     public String getURL();
// 
//     public void setSize(int width, int height);
// 
//     public int getHeight();
// 
//     public int getWidth();
// 
//     public boolean isResizable();
// 
//     public void setResizable(boolean resizable);
// 
//     public boolean isMenuBarEnabled();
// 
//     public void setMenuBar(boolean enabled);
// 
//     public boolean isContextMenuEnabled();
// 
//     public void setContextMenu(boolean enabled);
// 
//     public boolean isPrintSupported();
// 
//     public void setPrintSupport(boolean enabled);
// 
//     public boolean isDownloadSupported();
// 
//     public void setDownloadSupport(boolean enabled);
// 
//     public boolean isOpenWindowSupported();
// 
//     public void setOpenWindowSupport(boolean enabled);
// 
//     public void setHorizontalScrollBarPolicy(String policy);
// 
//     public void setVerticalScrollBarPolicy(String policy);
// 
//     public String getVerticalScrollBarPolicy();
// 
//     public String getHorizontalScrollBarPolicy();
// 
// 
// }


import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import org.apache.felix.ipojo.annotations.Component;
import org.apache.felix.ipojo.annotations.Invalidate;
import org.apache.felix.ipojo.annotations.Property;
import org.apache.felix.ipojo.annotations.Provides;
import org.apache.felix.ipojo.annotations.Validate;
import org.osgi.framework.BundleContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.trolltech.qt.core.QFile;
import com.trolltech.qt.core.QSize;
import com.trolltech.qt.core.Qt.ContextMenuPolicy;
import com.trolltech.qt.core.Qt.ScrollBarPolicy;
import com.trolltech.qt.gui.QApplication;
import com.trolltech.qt.gui.QDialog;
import com.trolltech.qt.gui.QFileDialog;
import com.trolltech.qt.gui.QIcon;
import com.trolltech.qt.gui.QPrintDialog;
import com.trolltech.qt.gui.QPrinter;
import com.trolltech.qt.network.QNetworkProxy;
import com.trolltech.qt.network.QNetworkReply;
import com.trolltech.qt.webkit.QWebView;
import de.akquinet.chameria.services.BrowserService;
/*
 * Copyright 2010 akquinet
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package de.akquinet.chameria.webview;






/**
 * Main component of the web view factory.
 * This component receives the configuration and creates
 * the browser windows and the web view.
 * It also has a couple of up-calls to handle the
 * configuration properly.
 */
@Component(name="chameria.webview")
@Provides
// Path: chameria-service/src/main/java/de/akquinet/chameria/services/BrowserService.java
// public interface BrowserService {
// 
//     public static final String SCROLLBAR_AS_NEEDED = "ScrollBarAsNeeded";
//     public static final String SCROLLBAR_ALWAYS_ON = "ScrollBarAlwaysOn";
//     public static final String SCROLLBAR_ALWAYS_OFF = "ScrollBarAlwaysOff";
// 
//     public boolean isFullScreen();
// 
//     public void setFullScreen(boolean fullscreen);
// 
//     public void setURL(String url);
// 
//     public String getURL();
// 
//     public void setSize(int width, int height);
// 
//     public int getHeight();
// 
//     public int getWidth();
// 
//     public boolean isResizable();
// 
//     public void setResizable(boolean resizable);
// 
//     public boolean isMenuBarEnabled();
// 
//     public void setMenuBar(boolean enabled);
// 
//     public boolean isContextMenuEnabled();
// 
//     public void setContextMenu(boolean enabled);
// 
//     public boolean isPrintSupported();
// 
//     public void setPrintSupport(boolean enabled);
// 
//     public boolean isDownloadSupported();
// 
//     public void setDownloadSupport(boolean enabled);
// 
//     public boolean isOpenWindowSupported();
// 
//     public void setOpenWindowSupport(boolean enabled);
// 
//     public void setHorizontalScrollBarPolicy(String policy);
// 
//     public void setVerticalScrollBarPolicy(String policy);
// 
//     public String getVerticalScrollBarPolicy();
// 
//     public String getHorizontalScrollBarPolicy();
// 
// 
// }


// Path: chameria-webview-factory/src/main/java/de/akquinet/chameria/webview/WebViewFactory.java
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import org.apache.felix.ipojo.annotations.Component;
import org.apache.felix.ipojo.annotations.Invalidate;
import org.apache.felix.ipojo.annotations.Property;
import org.apache.felix.ipojo.annotations.Provides;
import org.apache.felix.ipojo.annotations.Validate;
import org.osgi.framework.BundleContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.trolltech.qt.core.QFile;
import com.trolltech.qt.core.QSize;
import com.trolltech.qt.core.Qt.ContextMenuPolicy;
import com.trolltech.qt.core.Qt.ScrollBarPolicy;
import com.trolltech.qt.gui.QApplication;
import com.trolltech.qt.gui.QDialog;
import com.trolltech.qt.gui.QFileDialog;
import com.trolltech.qt.gui.QIcon;
import com.trolltech.qt.gui.QPrintDialog;
import com.trolltech.qt.gui.QPrinter;
import com.trolltech.qt.network.QNetworkProxy;
import com.trolltech.qt.network.QNetworkReply;
import com.trolltech.qt.webkit.QWebView;
import de.akquinet.chameria.services.BrowserService;

/*
 * Copyright 2010 akquinet
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package de.akquinet.chameria.webview;






/**
 * Main component of the web view factory.
 * This component receives the configuration and creates
 * the browser windows and the web view.
 * It also has a couple of up-calls to handle the
 * configuration properly.
 */
@Component(name="chameria.webview")
@Provides
public class WebViewFactory implements BrowserService {