Changeset 58:f0fa93354e15 in xplra for src/client/c


Ignore:
Timestamp:
03/07/13 18:16:49 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added the safe unregistration support to the C client interface

Location:
src/client/c/hu/varadiistvan/xplra
Files:
2 edited

Legend:

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

    r55 r58  
    891891/*----------------------------------------------------------------------------*/
    892892
     893extern "C" int xplra_multi_unregister_safely(int bufferID)
     894{
     895    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
     896    return (buffer==0) ? -1 : (buffer->unregisterSafelyFromXPlane() ? 1 : 0);
     897}
     898
     899/*----------------------------------------------------------------------------*/
     900
    893901extern "C" int xplra_multi_execute(int bufferID)
    894902{
  • src/client/c/hu/varadiistvan/xplra/xplra.h

    r55 r58  
    453453
    454454/**
    455  * Unregister the buffer with the given ID from X-Plane. If needed, it
    456  * will be finalized too.
     455 * Unregister the buffer with the given ID from X-Plane.
    457456 *
    458457 * @return 0 on success, -1 on error
    459458 */
    460459int xplra_multi_unregister(int bufferID);
     460
     461/*----------------------------------------------------------------------------*/
     462
     463/**
     464 * Unregister the buffer with the given ID from X-Plane safely,
     465 * i.e. the registration ID will be cleared anyway to support re-registration.
     466 *
     467 * @return -1 if the buffer ID is invalid, 0 if the unregistration
     468 * call failed, 1 if it was successful.
     469 */
     470int xplra_multi_unregister_safely(int bufferID);
    461471
    462472/*----------------------------------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.