Diffstat (limited to 'examples/opiecore/opcmciademo/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | examples/opiecore/opcmciademo/main.cpp | 24 |
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 @@ | |||
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 | |||