/[svn]/liblscp/trunk/src/client.c
ViewVC logotype

Diff of /liblscp/trunk/src/client.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 522 by capela, Sun Feb 13 17:20:46 2005 UTC revision 523 by capela, Mon May 9 10:17:12 2005 UTC
# Line 836  lscp_status_t lscp_remove_channel ( lscp Line 836  lscp_status_t lscp_remove_channel ( lscp
836    
837    
838  /**  /**
839   *  Getting all available engines:   *  Getting all available engines count:
840   *  GET AVAILABLE_ENGINES   *  GET AVAILABLE_ENGINES
841   *   *
842   *  @param pClient  Pointer to client instance structure.   *  @param pClient  Pointer to client instance structure.
843   *   *
844     *  @returns The current total number of sampler engines on success,
845     *  -1 otherwise.
846     */
847    int lscp_get_available_engines ( lscp_client_t *pClient )
848    {
849            int iAvailableEngines = -1;
850    
851        // Lock this section up.
852        lscp_mutex_lock(pClient->mutex);
853    
854        if (lscp_client_call(pClient, "GET AVAILABLE_ENGINES\r\n") == LSCP_OK)
855            iAvailableEngines = atoi(lscp_client_get_result(pClient));
856    
857        // Unlock this section down.
858        lscp_mutex_unlock(pClient->mutex);
859    
860        return iAvailableEngines;
861    }
862    
863    
864    /**
865     *  Getting all available engines:
866     *  LIST AVAILABLE_ENGINES
867     *
868     *  @param pClient  Pointer to client instance structure.
869     *
870   *  @returns A NULL terminated array of engine name strings,   *  @returns A NULL terminated array of engine name strings,
871   *  or NULL in case of failure.   *  or NULL in case of failure.
872   */   */
873  const char **lscp_get_available_engines ( lscp_client_t *pClient )  const char **lscp_list_available_engines ( lscp_client_t *pClient )
874  {  {
875      const char *pszSeps = ",";      const char *pszSeps = ",";
876    
# Line 856  const char **lscp_get_available_engines Line 882  const char **lscp_get_available_engines
882          pClient->engines = NULL;          pClient->engines = NULL;
883      }      }
884    
885      if (lscp_client_call(pClient, "GET AVAILABLE_ENGINES\r\n") == LSCP_OK)      if (lscp_client_call(pClient, "LIST AVAILABLE_ENGINES\r\n") == LSCP_OK)
886          pClient->engines = lscp_szsplit_create(lscp_client_get_result(pClient), pszSeps);          pClient->engines = lscp_szsplit_create(lscp_client_get_result(pClient), pszSeps);
887    
888      // Unlock this section down.      // Unlock this section down.

Legend:
Removed from v.522  
changed lines
  Added in v.523

  ViewVC Help
Powered by ViewVC