summaryrefslogtreecommitdiff
path: root/examples
authormickeyl <mickeyl>2005-05-22 17:23:36 (UTC)
committer mickeyl <mickeyl>2005-05-22 17:23:36 (UTC)
commitffe68fa0d9b4eb89fe1549b5734ca6ab23c8ab62 (patch) (unidiff)
tree6f2d8aed594028d80c1e106e3e89e69d39f788f5 /examples
parent55753b4e3550f950497fe073488a206d924b75be (diff)
downloadopie-ffe68fa0d9b4eb89fe1549b5734ca6ab23c8ab62.zip
opie-ffe68fa0d9b4eb89fe1549b5734ca6ab23c8ab62.tar.gz
opie-ffe68fa0d9b4eb89fe1549b5734ca6ab23c8ab62.tar.bz2
add small demo/testing application for opcmciasystem
Diffstat (limited to 'examples') (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 @@
1oconfigdemo
2Makefile*
3obj
4moc*
5*moc
6*.o
7~*
8
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 @@
1#include <opie2/opcmciasystem.h>
2#include <opie2/odebug.h>
3using namespace Opie::Core;
4
5int main( int argc, char** argv )
6{
7 odebug << "start" << oendl;
8 OPcmciaSystem* sys = OPcmciaSystem::instance();
9
10 odebug << "number of detected sockets is = " << sys->count() << oendl;
11 odebug << "number of populated sockets is = " << sys->cardCount() << oendl;
12
13 OPcmciaSystem::CardIterator it = sys->iterator();
14 OPcmciaSocket* sock = 0;
15 while ( sock = it.current() )
16 {
17 odebug << "card in socket # " << sock->number() << " is '" << sock->identity() << "'" << oendl;
18 ++it;
19 }
20
21 odebug << "end" << oendl;
22 return 0;
23}
24
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 @@
1TEMPLATE = app
2CONFIG = qt warn_on
3HEADERS =
4SOURCES = main.cpp
5
6INCLUDEPATH += $(OPIEDIR)/include
7DEPENDPATH += $(OPIEDIR)/include
8LIBS += -lopiecore2
9TARGET = opcmciademo
10
11!contains( platform, x11 ) {
12 include( $(OPIEDIR)/include.pro )
13}
14
15contains( platform, x11 ) {
16 LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib
17}
18
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 @@
1TEMPLATE = subdirs 1TEMPLATE = subdirs
2unix:SUBDIRS = odebugdemo oconfigdemo oglobalsettingsdemo onotifydemo onotifytest oprocessdemo oplugins oinputsystemdemo 2unix:SUBDIRS = odebugdemo oconfigdemo oglobalsettingsdemo onotifydemo onotifytest oprocessdemo oplugins oinputsystemdemo opcmciademo