summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-05-22 17:23:36 (UTC)
committer mickeyl <mickeyl>2005-05-22 17:23:36 (UTC)
commitffe68fa0d9b4eb89fe1549b5734ca6ab23c8ab62 (patch) (side-by-side diff)
tree6f2d8aed594028d80c1e106e3e89e69d39f788f5
parent55753b4e3550f950497fe073488a206d924b75be (diff)
downloadopie-ffe68fa0d9b4eb89fe1549b5734ca6ab23c8ab62.zip
opie-ffe68fa0d9b4eb89fe1549b5734ca6ab23c8ab62.tar.gz
opie-ffe68fa0d9b4eb89fe1549b5734ca6ab23c8ab62.tar.bz2
add small demo/testing application for opcmciasystem
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--examples/opiecore/opcmciademo/.cvsignore8
-rw-r--r--examples/opiecore/opcmciademo/main.cpp24
-rw-r--r--examples/opiecore/opcmciademo/opcmciademo.pro18
-rw-r--r--examples/opiecore/opiecore.pro2
4 files changed, 51 insertions, 1 deletions
diff --git a/examples/opiecore/opcmciademo/.cvsignore b/examples/opiecore/opcmciademo/.cvsignore
new file mode 100644
index 0000000..db3635b
--- a/dev/null
+++ b/examples/opiecore/opcmciademo/.cvsignore
@@ -0,0 +1,8 @@
+oconfigdemo
+Makefile*
+obj
+moc*
+*moc
+*.o
+~*
+
diff --git a/examples/opiecore/opcmciademo/main.cpp b/examples/opiecore/opcmciademo/main.cpp
new file mode 100644
index 0000000..3ee22c2
--- a/dev/null
+++ b/examples/opiecore/opcmciademo/main.cpp
@@ -0,0 +1,24 @@
+#include <opie2/opcmciasystem.h>
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+
+int main( int argc, char** argv )
+{
+ odebug << "start" << oendl;
+ OPcmciaSystem* sys = OPcmciaSystem::instance();
+
+ odebug << "number of detected sockets is = " << sys->count() << oendl;
+ odebug << "number of populated sockets is = " << sys->cardCount() << oendl;
+
+ OPcmciaSystem::CardIterator it = sys->iterator();
+ OPcmciaSocket* sock = 0;
+ while ( sock = it.current() )
+ {
+ odebug << "card in socket # " << sock->number() << " is '" << sock->identity() << "'" << oendl;
+ ++it;
+ }
+
+ odebug << "end" << oendl;
+ return 0;
+}
+
diff --git a/examples/opiecore/opcmciademo/opcmciademo.pro b/examples/opiecore/opcmciademo/opcmciademo.pro
new file mode 100644
index 0000000..43d5ec3
--- a/dev/null
+++ b/examples/opiecore/opcmciademo/opcmciademo.pro
@@ -0,0 +1,18 @@
+TEMPLATE = app
+CONFIG = qt warn_on
+HEADERS =
+SOURCES = main.cpp
+
+INCLUDEPATH += $(OPIEDIR)/include
+DEPENDPATH += $(OPIEDIR)/include
+LIBS += -lopiecore2
+TARGET = opcmciademo
+
+!contains( platform, x11 ) {
+ include( $(OPIEDIR)/include.pro )
+}
+
+contains( platform, x11 ) {
+ LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib
+}
+
diff --git a/examples/opiecore/opiecore.pro b/examples/opiecore/opiecore.pro
index 3550055..0bef8f6 100644
--- a/examples/opiecore/opiecore.pro
+++ b/examples/opiecore/opiecore.pro
@@ -1,2 +1,2 @@
TEMPLATE = subdirs
-unix:SUBDIRS = odebugdemo oconfigdemo oglobalsettingsdemo onotifydemo onotifytest oprocessdemo oplugins oinputsystemdemo
+unix:SUBDIRS = odebugdemo oconfigdemo oglobalsettingsdemo onotifydemo onotifytest oprocessdemo oplugins oinputsystemdemo opcmciademo