summaryrefslogtreecommitdiff
path: root/examples/opiecore/opcmciademo/main.cpp
blob: 3ee22c2a633464f6eff4be93de6c917007d10b9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;
}