1 /*
2  * * Copyright (C) 2009-2011 Ali <aliov@xfce.org>
3  * * Copyright (C) 2012-2017 Simon Steinbeiß <ochosi@xfce.org>
4  * * Copyright (C) 2012-2020 Sean Davis <bluesabre@xfce.org>
5  *
6  * Licensed under the GNU General Public License Version 2
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21  */
22 
23 #if !defined (__PAROLE_H_INSIDE__) && !defined (PAROLE_COMPILATION)
24 #error "Only <parole.h> can be included directly."
25 #endif
26 
27 #ifndef SRC_MISC_PAROLE_STREAM_H_
28 #define SRC_MISC_PAROLE_STREAM_H_
29 
30 #include <glib-object.h>
31 #include <gdk/gdkx.h>
32 
33 G_BEGIN_DECLS
34 
35 #define PAROLE_TYPE_STREAM        (parole_stream_get_type () )
36 #define PAROLE_STREAM(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), PAROLE_TYPE_STREAM, ParoleStream))
37 #define PAROLE_IS_STREAM(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), PAROLE_TYPE_STREAM))
38 
39 /**
40  * ParoleMediaType:
41  * @PAROLE_MEDIA_TYPE_UNKNOWN: Unknown media type
42  * @PAROLE_MEDIA_TYPE_LOCAL_FILE: File found on hard disk
43  * @PAROLE_MEDIA_TYPE_CDDA: Audio CD
44  * @PAROLE_MEDIA_TYPE_VCD: Video CD
45  * @PAROLE_MEDIA_TYPE_SVCD: Super Video CD
46  * @PAROLE_MEDIA_TYPE_DVD: DVD
47  * @PAROLE_MEDIA_TYPE_DVB: Digital Video Broadcast
48  * @PAROLE_MEDIA_TYPE_REMOTE: File stored remotely
49  *
50  * Media types.
51  *
52  **/
53 typedef enum {
54     PAROLE_MEDIA_TYPE_UNKNOWN,
55     PAROLE_MEDIA_TYPE_LOCAL_FILE,
56     PAROLE_MEDIA_TYPE_CDDA,
57     PAROLE_MEDIA_TYPE_VCD,
58     PAROLE_MEDIA_TYPE_SVCD,
59     PAROLE_MEDIA_TYPE_DVD,
60     PAROLE_MEDIA_TYPE_DVB,
61     PAROLE_MEDIA_TYPE_REMOTE
62 } ParoleMediaType;
63 
64 /**
65  * ParoleState:
66  * @PAROLE_STATE_STOPPED: Playback is stopped
67  * @PAROLE_STATE_PLAYBACK_FINISHED: Playback has finished
68  * @PAROLE_STATE_ABOUT_TO_FINISH: Playback is about to finish
69  * @PAROLE_STATE_PAUSED: Playback is paused
70  * @PAROLE_STATE_PLAYING: Playback is active
71  *
72  * Media playback states.
73  *
74  **/
75 typedef enum {
76     PAROLE_STATE_STOPPED = 0,
77     PAROLE_STATE_PLAYBACK_FINISHED,
78     PAROLE_STATE_ABOUT_TO_FINISH,
79     PAROLE_STATE_PAUSED,
80     PAROLE_STATE_PLAYING
81 } ParoleState;
82 
83 /**
84  * ParoleStream:
85  *
86  * This object contains all the information describing the current processed
87  * stream by Parole, this object is used with the callback function the
88  * #ParoleProviderPlayerIface::state-changed signal of the player, the plugin
89  * shouldn't take reference and all the properties are read-only for the plugins.
90  *
91  * Since: 0.2
92  */
93 typedef struct _ParoleStream        ParoleStream;
94 typedef struct _ParoleStreamClass   ParoleStreamClass;
95 typedef struct _ParoleStreamPrivate ParoleStreamPrivate;
96 
97 struct _ParoleStream {
98     GObject              parent;
99     ParoleStreamPrivate *priv;
100 };
101 
102 struct _ParoleStreamClass {
103     GObjectClass         parent_class;
104 };
105 
106 GType                   parole_stream_get_type          (void) G_GNUC_CONST;
107 
108 void                    parole_stream_set_image         (GObject *object,
109                                                          GdkPixbuf *pixbuf);
110 
111 GdkPixbuf              *parole_stream_get_image         (GObject *object);
112 
113 ParoleStream           *parole_stream_new               (void);
114 
115 void                    parole_stream_init_properties   (ParoleStream *stream);
116 
117 G_END_DECLS
118 
119 #endif /* SRC_MISC_PAROLE_STREAM_H_ */
120