summaryrefslogtreecommitdiff
path: root/examples
Side-by-side diff
Diffstat (limited to 'examples') (more/less context) (show 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