source: titan/plugins/networkbrowser/networkbrowser.c @ 15267

Last change on this file since 15267 was 15267, checked in by nit, 10 years ago
File size: 1.4 KB
Line 
1#include "../titan/struct.h"
2#include "../titan/debug.h"
3#include "../titan/header.h"
4#include "networkbrowser_header.h"
5#include "netlib/nbtscan.h"
6#include "netlib/showmount.h"
7#include "netlib/smbinfo.h"
8#include "networkbrowser.h"
9#include "networkbrowser_menulist.h"
10
11char pluginname[] = "Networkbrowser";
12char plugindesc[] = "Networkbrowser";
13char pluginpic[] = "%pluginpath%/networkbrowser/plugin.png";
14
15int pluginaktiv = 0;
16struct skin* pluginmenu = NULL;
17int pluginflag = 1; //don't show the plugin in pluginmanager
18
19//wird beim laden ausgefuehrt
20void init(void)
21{
22        pluginaktiv = 1;
23        char* tmpstr = NULL;
24        struct skin* networkmenu = getscreen("networkmenu");
25        struct skin* listbox = getscreennode(networkmenu, "listbox");
26        struct skin* child = NULL;
27
28        if(networkmenu == NULL || listbox == NULL)
29                return;
30
31        child = getscreennode(networkmenu, "networkbrowser");
32        if(child != NULL)
33                changeinput(child, "start");
34        pluginmenu = child;
35
36        tmpstr = ostrcat(getconfig("pluginpath", NULL), "/networkbrowser/skin.xml", 0, 0);
37        readscreen(tmpstr, 100, 1);
38        free(tmpstr); tmpstr = NULL;
39
40        debug(70, "Networkbrowser Plugin loadet !!!");
41}
42
43//wird beim entladen ausgefuehrt
44void deinit(void)
45{
46        delmarkedscreen(100);
47        pluginaktiv = 0;
48        debug(70, "Networkbrowser Plugin removed !!!");
49}
50
51
52//wird in der Pluginverwaltung bzw Menue ausfeguehrt
53void start(void)
54{
55        screennetworkbrowser();
56}
Note: See TracBrowser for help on using the repository browser.