Debian Codegraph @

components/extension/youtube/youtube.cpp

raw symbols SCIP
1 /* fre:ac - free audio converter
2 * Copyright (C) 2001-2021 Robert Kausch <[email protected]>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation, either version 2 of
7 * the License, or (at your option) any later version.
8 *
9 * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
10 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
11 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */
12
13 #include <smooth.h>
14
15 #include "youtube.h"
16 #include "config.h"
17
18 const String &BoCA::YouTube::GetComponentSpecs()
19 {
20 I18n *i18n = I18n::Get();
21
22 i18n->SetContext("Components::Extensions");
23
24 static String componentSpecs = String(" \
25 \
26 <?xml version=\"1.0\" encoding=\"UTF-8\"?> \
27 <component> \
28 <name>").Append(i18n->TranslateString("Video Downloader")).Append("</name> \
29 <version>1.0</version> \
30 <id>youtube-ext</id> \
31 <type>extension</type> \
32 </component> \
33 \
34 ");
35
36 return componentSpecs;
37 }
38
39 BoCA::YouTube::YouTube()
40 {
41 configLayer = NIL;
42 mainTabLayer = NIL;
43
44 getMainTabLayer.Connect(&YouTube::GetMainTabLayer, this);
45 }
46
47 BoCA::YouTube::~YouTube()
48 {
49 if (configLayer != NIL) Object::DeleteObject(configLayer);
50 if (mainTabLayer != NIL) Object::DeleteObject(mainTabLayer);
51 }
52
53 ConfigLayer *BoCA::YouTube::GetConfigurationLayer()
54 {
55 if (configLayer == NIL) configLayer = new ConfigureYouTube();
56
57 return configLayer;
58 }
59
60 Layer *BoCA::YouTube::GetMainTabLayer()
61 {
62 if (mainTabLayer == NIL) mainTabLayer = new LayerYouTube();
63
64 return mainTabLayer;
65 }