ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/truck/Audacious/Audacious.hpp
(Generate patch)

Comparing Audacious/Audacious.hpp (file contents):
Revision 23 by douglas, 2008-02-08T07:13:30-08:00 vs.
Revision 34 by douglas, 2008-03-02T17:28:19-08:00

# Line 10 | Line 10
10   #include <cstdlib>
11   #include <string>
12  
13 + #include <dbus/dbus-glib.h>
14   #include <glib.h>
15  
16   #include <foreach.hpp>
17  
18 + namespace Audacious
19 + {
20 +
21 + class Error : public std::exception
22 + {
23 +        ::GError *error;
24 + public:
25 +        Error(::GError *error) : error(error) {}
26 +        virtual ~Error() throw() { ::g_error_free(error); }
27 +        virtual const char *what() const throw() { return error->message; }
28 + };
29 +
30   class Audacious
31   {
32 <        int session;
32 >        ::DBusGProxy *session;
33   public:
34 <        Audacious(int session = 0) : session(session) {}
34 >        Audacious();
35  
36          template <typename Type_>
37          inline void Playlist(const Type_ &list, bool enqueue = false)
# Line 39 | Line 52 | public:
52          }
53  
54          void Playlist(char **list, int size, bool enqueue = false);
55 <        int GetVersion() const;
55 >        std::string GetVersion() const;
56  
57          template <typename Type_>
58          inline void PlaylistAdd(const Type_ &list)
# Line 54 | Line 67 | public:
67          }
68  
69          void PlaylistAdd(::GList *list);
70 <        void PlaylistDelete(int position);
70 >        void PlaylistDelete(unsigned position);
71          void Play();
72          void Pause();
73          void Stop();
74          bool IsPlaying() const;
75          bool IsPaused() const;
76          int GetPlaylistPosition() const;
77 <        void SetPlaylistPosition(int position);
77 >        void SetPlaylistPosition(unsigned position);
78          int GetPlaylistLength() const;
79          void PlaylistClear();
80          int GetOutputTime() const;
# Line 108 | Line 121 | public:
121                          ToggleShuffle();
122          }
123  
124 <        void GetEqualizer(float &preamp, float bands[10]) const;
125 <        float GetEqualizerPreamp() const;
126 <        float GetEqualizerBand(int band) const;
127 <        void SetEqualizer(float preamp, float bands[10]);
128 <        void SetEqualizerPreamp(float preamp);
129 <        void SetEqualizerBand(int band, float value);
124 >        void GetEqualizer(double &preamp, double bands[10]) const;
125 >        double GetEqualizerPreamp() const;
126 >        double GetEqualizerBand(int band) const;
127 >        void SetEqualizer(double preamp, double bands[10]);
128 >        void SetEqualizerPreamp(double preamp);
129 >        void SetEqualizerBand(int band, double value);
130  
131          // XMMS 1.2.1
132          void Quit();
# Line 142 | Line 155 | public:
155          void ShowJumpToFileBox();
156          void PlayqueueClear();
157          bool PlayqueueIsQueued(int position) const;
145        int GetPlayqueuePosition(int position) const;
158          int GetPlayqueueQueuePosition(int position) const;
159  
148        // Audacious 1.2
149        void SetSessionUri(const std::string &uri);
150        std::string GetSessionUri() const;
151
152        enum Type { Unix, Tcp };
153
154        void SetSessionType(Type type);
155
160          // Audacious 1.3
161          void PlaylistEnqueueToTemp(const std::string &string);
162          std::string GetTupleFieldData(const std::string &field, int position);
163 +
164 +        // Audacious 1.4
165 +        void ShowAboutBox();
166 +        void ToggleAboutBox(bool show);
167 +        void ToggleJumpToFileBox(bool show);
168 +        void TogglePreferencesBox(bool show);
169 +        void ToggleFileBrowser(bool show);
170 +        void EqualizerActivate(bool active);
171   };
172  
173   template <>
# Line 166 | Line 178 | inline void Audacious::PlaylistAdd(const
178          PlaylistAdd(&list);
179   }
180  
181 + }
182 +
183   #endif//_Audacious_hpp_

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines