summaryrefslogtreecommitdiff
path: root/libopie2/opiemm
authorzecke <zecke>2004-03-13 19:51:45 (UTC)
committer zecke <zecke>2004-03-13 19:51:45 (UTC)
commit6d08277737e22b7a1527124623f3571969073ddf (patch) (side-by-side diff)
tree4129e674e21df767b31299e873dd44e33a308e1b /libopie2/opiemm
parent8e28911f7199f4450ac5eef09482069f9b9caea2 (diff)
downloadopie-6d08277737e22b7a1527124623f3571969073ddf.zip
opie-6d08277737e22b7a1527124623f3571969073ddf.tar.gz
opie-6d08277737e22b7a1527124623f3571969073ddf.tar.bz2
Move XML class to internal PIM
Add namespaces!!! Opie::Core and Opie::Core::Private Opie::Net and Opie::Net::Private Opie::Ui and Opie::Ui::Private Opie::MM and Opie::MM::Private Opie::DB and Opie::DB::Private PIM classes are not yet converted because we will do other work on it as well
Diffstat (limited to 'libopie2/opiemm') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiemm/opiemm.pro2
-rw-r--r--libopie2/opiemm/osoundsystem.cpp2
-rw-r--r--libopie2/opiemm/osoundsystem.h17
3 files changed, 20 insertions, 1 deletions
diff --git a/libopie2/opiemm/opiemm.pro b/libopie2/opiemm/opiemm.pro
index d6f54ee..ce30dfb 100644
--- a/libopie2/opiemm/opiemm.pro
+++ b/libopie2/opiemm/opiemm.pro
@@ -1,18 +1,18 @@
TEMPLATE = lib
CONFIG += qt warn_on debug
DESTDIR = $(OPIEDIR)/lib
HEADERS = osoundsystem.h
SOURCES = osoundsystem.cpp
INTERFACES =
TARGET = opiemm2
-VERSION = 1.8.2
+VERSION = 1.9.0
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
!contains( platform, x11 ) {
include ( $(OPIEDIR)/include.pro )
}
contains( platform, x11 ) {
LIBS = -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib
}
diff --git a/libopie2/opiemm/osoundsystem.cpp b/libopie2/opiemm/osoundsystem.cpp
index 51e088c..07f26c0 100644
--- a/libopie2/opiemm/osoundsystem.cpp
+++ b/libopie2/opiemm/osoundsystem.cpp
@@ -32,24 +32,26 @@
#include <opie2/osoundsystem.h>
#include <opie2/odebug.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/soundcard.h>
#include <sys/stat.h>
+using namespace Opie::Core;
+using namespace Opie::MM;
/*======================================================================================
* OSoundSystem
*======================================================================================*/
OSoundSystem* OSoundSystem::_instance = 0;
OSoundSystem::OSoundSystem()
{
odebug << "OSoundSystem::OSoundSystem()" << oendl;
synchronize();
}
diff --git a/libopie2/opiemm/osoundsystem.h b/libopie2/opiemm/osoundsystem.h
index 096d397..3c3b622 100644
--- a/libopie2/opiemm/osoundsystem.h
+++ b/libopie2/opiemm/osoundsystem.h
@@ -27,24 +27,27 @@
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef OSOUNDSYSTEM_H
#define OSOUNDSYSTEM_H
#include <qobject.h>
#include <qdict.h>
#include <qmap.h>
+namespace Opie {
+namespace MM {
+
class OAudioInterface;
class OMixerInterface;
class OSoundCard;
/*======================================================================================
* OSoundSystem
*======================================================================================*/
/**
* @brief A container class for all audio interfaces
*
* This class provides access to all available audio/midi/sequencer interfaces of your computer.
@@ -81,24 +84,26 @@ class OSoundSystem : public QObject
* @internal Rebuild the internal interface database
* @note Sometimes it might be useful to call this from client code,
* e.g. after issuing a cardctl insert
*/
void synchronize();
protected:
OSoundSystem();
private:
static OSoundSystem* _instance;
CardMap _interfaces;
+ class Private;
+ Private *d;
};
/*======================================================================================
* OSoundCard
*======================================================================================*/
class OSoundCard : public QObject
{
Q_OBJECT
public:
@@ -115,24 +120,27 @@ class OSoundCard : public QObject
bool hasMixer() const { return _audio; };
bool hasAudio() const { return _mixer; };
OAudioInterface* audio() const { return _audio; };
OMixerInterface* mixer() const { return _mixer; };
protected:
OAudioInterface* _audio;
OMixerInterface* _mixer;
private:
void init();
+ private:
+ class Private;
+ Private *d;
};
/*======================================================================================
* OAudioInterface
*======================================================================================*/
class OAudioInterface : public QObject
{
Q_OBJECT
public:
/**
@@ -141,24 +149,27 @@ class OAudioInterface : public QObject
*/
OAudioInterface( QObject* parent, const char* name );
/**
* Destructor.
*/
virtual ~OAudioInterface();
protected:
const int _sfd;
private:
void init();
+ private:
+ class Private;
+ Private *d;
};
/*======================================================================================
* OMixerInterface
*======================================================================================*/
class OMixerInterface : public QObject
{
Q_OBJECT
public:
@@ -201,16 +212,22 @@ class OMixerInterface : public QObject
/**
* @returns the volume of @a channel or -1, if the channel doesn't exist.
* @note You might want to use @ref hasChannel() to check if a channel exists.
*/
int volume( const QString& channel ) const;
protected:
int _fd;
QMap<QString, int> _channels;
private:
void init();
+ private:
+ class Private;
+ Private *d;
};
+}
+}
+
#endif // OSOUNDSYSTEM_H