author | mickeyl <mickeyl> | 2005-05-22 17:23:36 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-05-22 17:23:36 (UTC) |
commit | ffe68fa0d9b4eb89fe1549b5734ca6ab23c8ab62 (patch) (unidiff) | |
tree | 6f2d8aed594028d80c1e106e3e89e69d39f788f5 | |
parent | 55753b4e3550f950497fe073488a206d924b75be (diff) | |
download | opie-ffe68fa0d9b4eb89fe1549b5734ca6ab23c8ab62.zip opie-ffe68fa0d9b4eb89fe1549b5734ca6ab23c8ab62.tar.gz opie-ffe68fa0d9b4eb89fe1549b5734ca6ab23c8ab62.tar.bz2 |
add small demo/testing application for opcmciasystem
-rw-r--r-- | examples/opiecore/opcmciademo/.cvsignore | 8 | ||||
-rw-r--r-- | examples/opiecore/opcmciademo/main.cpp | 24 | ||||
-rw-r--r-- | examples/opiecore/opcmciademo/opcmciademo.pro | 18 | ||||
-rw-r--r-- | examples/opiecore/opiecore.pro | 2 |
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 @@ | |||
1 | oconfigdemo | ||
2 | Makefile* | ||
3 | obj | ||
4 | moc* | ||
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> | ||
3 | using namespace Opie::Core; | ||
4 | |||
5 | int 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 @@ | |||
1 | TEMPLATE = app | ||
2 | CONFIG = qt warn_on | ||
3 | HEADERS = | ||
4 | SOURCES = main.cpp | ||
5 | |||
6 | INCLUDEPATH += $(OPIEDIR)/include | ||
7 | DEPENDPATH += $(OPIEDIR)/include | ||
8 | LIBS += -lopiecore2 | ||
9 | TARGET = opcmciademo | ||
10 | |||
11 | !contains( platform, x11 ) { | ||
12 | include( $(OPIEDIR)/include.pro ) | ||
13 | } | ||
14 | |||
15 | contains( 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 @@ | |||
1 | TEMPLATE = subdirs | 1 | TEMPLATE = subdirs |
2 | unix:SUBDIRS = odebugdemo oconfigdemo oglobalsettingsdemo onotifydemo onotifytest oprocessdemo oplugins oinputsystemdemo | 2 | unix:SUBDIRS = odebugdemo oconfigdemo oglobalsettingsdemo onotifydemo onotifytest oprocessdemo oplugins oinputsystemdemo opcmciademo |