Ignore:
Timestamp:
04/13/13 12:54:56 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 3 'hg:/home/ivaradi/xplane/hg/xplra' '/'>, 'public')
Message:

Added the description of the C API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/client/c/hu/varadiistvan/xplra/xplra.cc

    r58 r70  
    13731373    if (connection==0) return -1;
    13741374
     1375    connection->disconnect();
     1376
     1377    return 0;
     1378}
     1379
     1380//------------------------------------------------------------------------------
     1381//------------------------------------------------------------------------------
     1382
     1383extern "C" int xplra_reconnect(int connectionID)
     1384{
     1385    Connection* connection = ConnectionSlot::getValue(connectionID);
     1386    if (connection==0) return -1;
     1387
     1388    try {
     1389        connection->connect();
     1390        return 0;
     1391    } catch(...) {
     1392        return -1;
     1393    }
     1394}
     1395
     1396//------------------------------------------------------------------------------
     1397//------------------------------------------------------------------------------
     1398
     1399extern "C" int xplra_destroy(int connectionID)
     1400{
     1401    Connection* connection = ConnectionSlot::getValue(connectionID);
     1402    if (connection==0) return -1;
     1403
    13751404    ConnectionSlot::clearValue(connectionID);
    1376     connection->disconnect();
    13771405    delete connection;
    13781406
Note: See TracChangeset for help on using the changeset viewer.