Update of /cvsroot/playerstage/code/player/libplayersd
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23190/libplayersd

Modified Files:
        playersd.h 
Log Message:
added docs for playersd

Index: playersd.h
===================================================================
RCS file: /cvsroot/playerstage/code/player/libplayersd/playersd.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** playersd.h  25 Sep 2007 23:53:50 -0000      1.4
--- playersd.h  26 Sep 2007 00:17:33 -0000      1.5
***************
*** 41,44 ****
--- 41,59 ----
   */
  
+ /*
+  * Interface to libplayersd
+  *
+  * $Id$
+  */
+ 
+ /** @defgroup libplayersd libplayersd
+  * @brief Player service discovery library
+ 
+ This library provides service discovery capabilities for Player devices.
+ */
+ 
+ /** @ingroup libplayersd
+ @{ */
+ 
  #ifndef _PLAYER_SD_H
  #define _PLAYER_SD_H
***************
*** 54,58 ****
  #define PLAYER_SD_TXT_MAXLEN 256
  
! // A device, represented by its name and address
  typedef struct
  {
--- 69,73 ----
  #define PLAYER_SD_TXT_MAXLEN 256
  
! /// A device, represented by its name and address
  typedef struct
  {
***************
*** 61,109 ****
  } player_sd_device_t;
  
! // Service discovery object
  typedef struct
  {
!   // Opaque pointer to underlying zeroconf client object.  Contents
!   // will vary by zeroconf implementation.
    void* sdRef;
!   // List of devices discovered by browsing
    player_sd_device_t* devs;
!   // Number of devices discovered
    size_t numdevs;
  } player_sd_t;
  
! // Initialize service discovery, passing back a pointer that will be passed
! // into all future calls.  Returns NULL on failure.
  player_sd_t* player_sd_init(void);
  
! // Finalize service discovery, freeing associated resources.
  void player_sd_fini(player_sd_t* sd);
  
! // Register the named device.  Returns 0 on success, non-zero on error.
! // Name may be automatically changed in case of conflict.
  int player_sd_register(player_sd_t* sd, 
                         const char* name, 
                         player_devaddr_t addr);
  
! // Unregister (terminate) the named device.  Returns 0 on success, non-zero 
! // on error.  Name may be automatically changed in case of conflict.
  int player_sd_unregister(player_sd_t* sd, 
                           const char* name, 
                           player_devaddr_t addr);
  
! // Prototype for a callback function that can be invoked when devices are
! // added or removed.
  typedef void (*player_sd_browse_callback_fn_t)(player_sd_t* sd,
                                                 const char* name,
                                                 player_devaddr_t addr);
  
! // Browse for player devices.  Browses for timeout ms, accruing the results
! // into the sd object.  If keepalive is non-zero, then the browsing session
! // is left open and can be updated by future calls to player_sd_update().
! // Otherwise, the browsing session is closed before returning.
! // If cb is non-NULL, then it is registered and
! // invoked whenever new device notifications are received (call
! // player_sd_update to give this a chance to happen).  Returns 0 on
! // success, non-zero on error.
  int player_sd_browse(player_sd_t* sd,
                       int timeout, 
--- 76,124 ----
  } player_sd_device_t;
  
! /// Service discovery object
  typedef struct
  {
!   /// Opaque pointer to underlying zeroconf client object.  Contents
!   /// will vary by zeroconf implementation.
    void* sdRef;
!   /// List of devices discovered by browsing
    player_sd_device_t* devs;
!   /// Number of devices discovered
    size_t numdevs;
  } player_sd_t;
  
! /// Initialize service discovery, passing back a pointer that will be passed
! /// into all future calls.  Returns NULL on failure.
  player_sd_t* player_sd_init(void);
  
! /// Finalize service discovery, freeing associated resources.
  void player_sd_fini(player_sd_t* sd);
  
! /// Register the named device.  Returns 0 on success, non-zero on error.
! /// Name may be automatically changed in case of conflict.
  int player_sd_register(player_sd_t* sd, 
                         const char* name, 
                         player_devaddr_t addr);
  
! /// Unregister (terminate) the named device.  Returns 0 on success, non-zero 
! /// on error.  Name may be automatically changed in case of conflict.
  int player_sd_unregister(player_sd_t* sd, 
                           const char* name, 
                           player_devaddr_t addr);
  
! /// Prototype for a callback function that can be invoked when devices are
! /// added or removed.
  typedef void (*player_sd_browse_callback_fn_t)(player_sd_t* sd,
                                                 const char* name,
                                                 player_devaddr_t addr);
  
! /// Browse for player devices.  Browses for timeout ms, accruing the results
! /// into the sd object.  If keepalive is non-zero, then the browsing session
! /// is left open and can be updated by future calls to player_sd_update().
! /// Otherwise, the browsing session is closed before returning.
! /// If cb is non-NULL, then it is registered and
! /// invoked whenever new device notifications are received (call
! /// player_sd_update to give this a chance to happen).  Returns 0 on
! /// success, non-zero on error.
  int player_sd_browse(player_sd_t* sd,
                       int timeout, 
***************
*** 111,122 ****
                       player_sd_browse_callback_fn_t cb);
  
! // Check for new device updates, waiting for timeout ms.  Contents of sd
! // are updated, and if a callback was passed to player_sd_browse, then this
! // function is also called for each discovered device.  Only makes sense to
! // call this function after a call to player_sd_browse.  Returns 0 on
! // success, non-zero on error.
  int player_sd_update(player_sd_t* sd, int timeout);
  
! // Stop browsing.  Returns 0 on success, non-zero on error.
  int player_sd_browse_stop(player_sd_t* sd);
  
--- 126,137 ----
                       player_sd_browse_callback_fn_t cb);
  
! /// Check for new device updates, waiting for timeout ms.  Contents of sd
! /// are updated, and if a callback was passed to player_sd_browse, then this
! /// function is also called for each discovered device.  Only makes sense to
! /// call this function after a call to player_sd_browse.  Returns 0 on
! /// success, non-zero on error.
  int player_sd_update(player_sd_t* sd, int timeout);
  
! /// Stop browsing.  Returns 0 on success, non-zero on error.
  int player_sd_browse_stop(player_sd_t* sd);
  
***************
*** 125,127 ****
--- 140,144 ----
  #endif
  
+ /** @} */
+ 
  #endif


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to