Changeset 2060

Show
Ignore:
Timestamp:
03/19/08 16:37:14 (2 years ago)
Author:
nedko
Message:

Expose "get version" functionality in jack/jack.h and fix #24

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • jack2/branches/control/common/jack/jack.h

    r2051 r2060  
    4242 
    4343    /** 
     44     * Call this function to get version of the JACK, in form of several numbers 
     45     * 
     46     * @param major_ptr pointer to variable receiving major version of JACK. 
     47     * 
     48     * @param minor_ptr pointer to variable receiving minor version of JACK. 
     49     * 
     50     * @param major_ptr pointer to variable receiving micro version of JACK. 
     51     * 
     52     * @param major_ptr pointer to variable receiving protocol version of JACK. 
     53     * 
     54     */ 
     55    void 
     56    jack_get_version( 
     57        int *major_ptr, 
     58        int *minor_ptr, 
     59        int *micro_ptr, 
     60        int *proto_ptr); 
     61 
     62    /** 
     63     * Call this function to get version of the JACK, in form of a string 
     64     * 
     65     * @return Human readable string describing JACK version being used. 
     66     * 
     67     */ 
     68    const char * 
     69    jack_get_version_string(); 
     70 
     71    /** 
    4472     * Open an external client session with a JACK server.  This interface 
    4573     * is more complex but more powerful than jack_client_new().  With it, 
  • jack2/branches/control/common/JackAPI.cpp

    r2051 r2060  
    4949{ 
    5050#endif 
     51 
     52    EXPORT 
     53    void 
     54    jack_get_version( 
     55        int *major_ptr, 
     56        int *minor_ptr, 
     57        int *micro_ptr, 
     58        int *proto_ptr); 
     59 
     60    EXPORT 
     61    const char * 
     62    jack_get_version_string(); 
    5163 
    5264    EXPORT jack_client_t * jack_client_open_aux (const char *client_name, 
     
    16751687    } 
    16761688} 
     1689 
     1690EXPORT 
     1691void 
     1692jack_get_version( 
     1693    int *major_ptr, 
     1694    int *minor_ptr, 
     1695    int *micro_ptr, 
     1696    int *proto_ptr) 
     1697{ 
     1698    // FIXME: We need these comming from build system 
     1699    *major_ptr = 0; 
     1700    *minor_ptr = 0; 
     1701    *micro_ptr = 0; 
     1702    *proto_ptr = 0; 
     1703} 
     1704 
     1705EXPORT 
     1706const char * 
     1707jack_get_version_string() 
     1708{ 
     1709    return VERSION; 
     1710} 
  • jack2/branches/control/linux/dbus/jackdbus.c

    r2059 r2060  
    3232#include "jackdbus.h" 
    3333#include "controller.h" 
    34 #include "common/JackConstants.h" 
    3534#include "jack/jack.h" 
    3635#include "jack/jslist.h" 
     
    779778 
    780779    jack_info("------------------"); 
    781     jack_info("Controller activated. Version " VERSION); 
     780    jack_info("Controller activated. Version %s", jack_get_version_string()); 
    782781 
    783782    if (!dbus_threads_init_default())