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

Modified Files:
        functiontable.c functiontable.h 
Log Message:
added geoff pluggable interface patch


Index: functiontable.h
===================================================================
RCS file: /cvsroot/playerstage/code/player/libplayerxdr/functiontable.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** functiontable.h     27 Feb 2007 18:09:21 -0000      1.10
--- functiontable.h     21 May 2007 11:03:32 -0000      1.11
***************
*** 31,34 ****
--- 31,36 ----
  #define _FUNCTIONTABLE_H_
  
+ #include <libplayercore/playerconfig.h>
+ 
  #ifdef __cplusplus
  extern "C" {
***************
*** 86,89 ****
--- 88,101 ----
  int playerxdr_ftable_add(playerxdr_function_t f, int replace);
  
+ /** @brief Add multiple entries to the function table.
+  *
+  * @param f : a pointer to the function table entries to add (NULL terminated
+  *            array).
+  * @param replace : whether any existing functions should be replaced.
+  *
+  * @returns 0 on success, -1 on failure
+  */
+ int playerxdr_ftable_add_multi(playerxdr_function_t *flist, int replace);
+ 
  /** @brief Initialize the XDR function table.
   *

Index: functiontable.c
===================================================================
RCS file: /cvsroot/playerstage/code/player/libplayerxdr/functiontable.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -C2 -d -r1.82 -r1.83
*** functiontable.c     20 May 2007 00:30:15 -0000      1.82
--- functiontable.c     21 May 2007 11:03:32 -0000      1.83
***************
*** 657,660 ****
--- 657,675 ----
  }
  
+ int
+ playerxdr_ftable_add_multi(playerxdr_function_t *flist, int replace)
+ {
+   playerxdr_function_t* f;
+ 
+   for (f = flist; f->packfunc; f++)
+   {
+     if (playerxdr_ftable_add (*f, replace) < 0)
+     {
+       puts("Failed to add new function to XDR function table");
+       return(-1);
+     }
+   }
+ }
+ 
  playerxdr_function_t*
  playerxdr_get_ftrow(uint16_t interf, uint8_t type, uint8_t subtype)
***************
*** 693,700 ****
    }
  
-   printf( "interface %d %d\n", curr->interf, interf );
-   printf( "type %d %d\n", curr->type, type );
-   printf( "subtype %d %d\n", curr->subtype, subtype );
- 
    return(NULL);
  }
--- 708,711 ----


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to