botsense/bsProxy/bsProxyMod.c
BsModIter_T *ModCbIterFirst(BsModIterOver_T eOver, const char *sPattern)
{
  BsModIter_T  *pIter = NEW(BsModIter_T);

  pIter->m_eOver    = eOver;
  pIter->m_hndVConn = -1;
  pIter->m_sDevUri  = NULL;
  pIter->m_sModUri  = NULL;
  pIter->m_rd       = -1;

  switch( eOver )
  {
    case BsModIterOverDevUri:
      pIter->m_sDevUri = new_strdup(sPattern);
      return ModCbIterNext(pIter);
    case BsModIterOverModUri:
      pIter->m_sModUri = new_strdup(sPattern);
      return ModCbIterNext(pIter);
    case BsModIterOverVConn:
      return ModCbIterNext(pIter);
    default:
      ModCbIterDelete(pIter);
      return NULL;
  }
}
/*!
 * \brief Start an iterator over the virtual connections matching the given 
 * pattern.
 *
 * If a virtual connection match is found, an iterator is allocated and its data
 * is filled with the first set of information.
 *
 * The caller must delete the iterator by calling \ref ModCbIterNext() until
 * there are no more matches (auto-delete) or by calling \ref ModCbIterDelete().
 *
 * \param eOver       What pattern to iterator over (see \ref BsModIterOver_T).
 * \param sPattern    Device or module URI pattern string.
 *
 * \return On success, returns the pointer to the allocacted module iterator.\n
 * On failure, NULL is returned.
 */
\brief Start an iterator over the virtual connections matching the given
pattern.

If a virtual connection match is found, an iterator is allocated and its data
is filled with the first set of information.

The caller must delete the iterator by calling \ref ModCbIterNext() until
there are no more matches (auto-delete) or by calling \ref ModCbIterDelete().

\param eOver       What pattern to iterator over .
\param sPattern    Device or module URI pattern string.

\return On success, returns the pointer to the allocacted module iterator.\n
On failure, NULL is returned.
\ brief Start an iterator over the virtual connections matching the given pattern . If a virtual connection match is found an iterator is allocated and its data is filled with the first set of information . The caller must delete the iterator by calling \ ref ModCbIterNext () until there are no more matches ( auto - delete ) or by calling \ ref ModCbIterDelete () . \ param eOver What pattern to iterator over . \ param sPattern Device or module URI pattern string . \ return On success returns the pointer to the allocacted module iterator . \ n On failure NULL is returned .
BsModIter_T *ModCbIterFirst(BsModIterOver_T eOver, const char *sPattern)
{
  BsModIter_T  *pIter = NEW(BsModIter_T);
  pIter->m_eOver    = eOver;
  pIter->m_hndVConn = -1;
  pIter->m_sDevUri  = NULL;
  pIter->m_sModUri  = NULL;
  pIter->m_rd       = -1;
  switch( eOver )
  {
    case BsModIterOverDevUri:
      pIter->m_sDevUri = new_strdup(sPattern);
      return ModCbIterNext(pIter);
    case BsModIterOverModUri:
      pIter->m_sModUri = new_strdup(sPattern);
      return ModCbIterNext(pIter);
    case BsModIterOverVConn:
      return ModCbIterNext(pIter);
    default:
      ModCbIterDelete(pIter);
      return NULL;
  }
}
BsModIter_T * ModCbIterFirst ( BsModIterOver_T eOver , const char * sPattern ) { BsModIter_T * pIter = NEW ( BsModIter_T ) ; pIter -> m_eOver = eOver ; pIter -> m_hndVConn = -1 ; pIter -> m_sDevUri = NULL ; pIter -> m_sModUri = NULL ; pIter -> m_rd = -1 ; switch ( eOver ) { case BsModIterOverDevUri : pIter -> m_sDevUri = new_strdup ( sPattern ) ; return ModCbIterNext ( pIter ) ; case BsModIterOverModUri : pIter -> m_sModUri = new_strdup ( sPattern ) ; return ModCbIterNext ( pIter ) ; case BsModIterOverVConn : return ModCbIterNext ( pIter ) ; default : ModCbIterDelete ( pIter ) ; return NULL ; } }
\brief Start an iterator over the virtual connections matching the given
 pattern.
\ brief Start an iterator over the virtual connections matching the given pattern .