Debian Codegraph @

components/extension/youtube/layer.h

raw symbols SCIP
1 /* fre:ac - free audio converter
2 * Copyright (C) 2001-2017 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 #ifndef H_YOUTUBE_LAYER
14 #define H_YOUTUBE_LAYER
15
16 #include <smooth.h>
17 #include <boca.h>
18
19 using namespace smooth;
20 using namespace smooth::GUI;
21
22 using namespace BoCA;
23
24 namespace BoCA
25 {
26 class Video;
27 class VideoSite;
28 class VideoList;
29
30 class LayerYouTube : public Layer
31 {
32 private:
33 Array<VideoSite *, Void *> sites;
34 Bool missingDecoders;
35
36 Array<Track> tracks;
37
38 Text *text_url;
39 EditBox *edit_url;
40 Button *button_add_url;
41
42 CheckBox *check_auto_download;
43 CheckBox *check_keep_files;
44
45 Text *text_downloads;
46 VideoList *list_downloads;
47
48 Text *text_tracks;
49 ListBox *list_tracks;
50
51 ActiveArea *area_cover;
52 Image *image_cover;
53
54 Text *text_site;
55 Text *text_site_value;
56
57 Text *text_source;
58 Hyperlink *link_source;
59
60 Text *text_title;
61 EditBox *edit_title;
62
63 Text *text_description;
64 MultiEdit *edit_description;
65
66 Text *text_uploader;
67 Text *text_uploader_value;
68
69 Text *text_date;
70 Text *text_date_value;
71
72 S::System::Timer *timer_check_clipboard;
73
74 String previousClipboardText;
75
76 Void LoadVideoSites();
77 Void FreeVideoSites();
78
79 VideoSite *GetVideoSiteForURL(const String &);
80
81 String GetClipboardText();
82
83 Bool StartDownload(const String &);
84 Bool FinishDownload(Video *);
85 slots:
86 Void OnApplicationModifyTrack(const Track &);
87 Void OnApplicationRemoveTrack(const Track &);
88 Void OnApplicationSelectTrack(const Track &);
89
90 Void OnApplicationRemoveAllTracks();
91
92 Void OnTimerCheckClipboard();
93
94 Void OnEditDownloadURL();
95 Void OnDownloadTrack();
96 Void OnFinishDownload(Video *);
97
98 Void OnSelectTrack();
99 Void OnSelectNone();
100
101 Void OnEditMetadata();
102
103 Void OnShowLayer();
104 Void OnQuit();
105
106 Void OnChangeSize(const Size &);
107 Void OnChangeLanguageSettings();
108 public:
109 LayerYouTube();
110 ~LayerYouTube();
111 };
112 };
113
114 #endif