From ffe68fa0d9b4eb89fe1549b5734ca6ab23c8ab62 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Sun, 22 May 2005 17:23:36 +0000 Subject: add small demo/testing application for opcmciasystem --- 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 +#include +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 -- cgit v0.9.0.2