Meego Wiki
Views

TV Browser Control API

From MeeGo wiki
Jump to: navigation, search

Control API for MeeGo TV Browser

Introduction

Control API, also known as browser service, is a set of DBus APIs exposed from MeeGo TV Browser to manipulate the browsing without manual operations. A typical usage scenario is that the browser is used to launch some URLs specified by the main UI components. The main UI would like to control the browser position, url and browsing behavior. These purposes could be achieved by calling DBus APIs of the browser.



       -----------------------------------------             ------------------------------------------ 
       | Browser Process                       |             | Third Party Applications                |
       |                                       |             |                                         |
       |        ---------------------------    |             |  |--------------------------------      |
       |       |  Control API DBus Server  |←--------- |  |  Control API DBus Client        |     |
       |       |                           |---------→ |  |                                 |     |
       |        ---------------------------    |             |  |-------------------------------- |     |
       -----------------------------------------             -------------------------------------------

API SPEC

API Description Implementation Note
void openURL(string url) Load a URL
void backward() Page backward
void forward() Page forward
void reload() Reload page
void stop() Stop loading the page
string getCurrentURL() Read the current URL
string getCurrentTitle() Read current webpage's title
void createTab() Create a new tab
void closeTab (int index) Close the tab
void resizeWindow(int width, int height) Resize the window
void toggleFullScreen() Toggle fullscreen mode the browser enters/quits the fullscreen mode
void hideWindow() hide the browser window
void showWindow() show the browser window
void showTab (int index) show the designated tab bring to foreground
void toggleNavigationBar() hide/display the whole tool bar produce the same effect as press F11
void setDownloadDir(const string dir) set the default download directory
void screenLeft() slide one screen left
void screenRight() slide one screen right
void screenUp() slide one screen up
void screenDown() slide one screen down
bool isPageLoaded() query whether currently the page loading has finished
Read Page security origin confirm not to implement
Read frame parent confirm not to implement
Print active frame confirm not to implement
Associated apps configuration confirm not to implement
Provide a password to be implemented in next version
Accept a certificate to be implemented in next version
Personal tools