summaryrefslogtreecommitdiff
path: root/examples/opiecore/opcmciademo/main.cpp
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 /examples/opiecore/opcmciademo/main.cpp
parent55753b4e3550f950497fe073488a206d924b75be (diff)
downloadopie-ffe68fa0d9b4eb89fe1549b5734ca6ab23c8ab62.zip
opie-ffe68fa0d9b4eb89fe1549b5734ca6ab23c8ab62.tar.gz
opie-ffe68fa0d9b4eb89fe1549b5734ca6ab23c8ab62.tar.bz2
add small demo/testing application for opcmciasystem
Diffstat (limited to 'examples/opiecore/opcmciademo/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--examples/opiecore/opcmciademo/main.cpp24
1 files changed, 24 insertions, 0 deletions
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;
+}
+