/**\brief Check the 1394 subsystem for any connected cameras. * \ingroup camcore * \return * - CAM_SUCCESS: Found at least one camera and have selected camera 0 * - CAM_ERROR: Found no cameras on the 1394 bus(es) * * This function is now deprecated in favor of RefreshCameraList(). * It is maintained for backwards compatibility and will be removed * in a future version. */ int C1394Camera::CheckLink() { DllTrace(DLL_TRACE_ENTER,"ENTER CheckLink\n"); if(RefreshCameraList() > 0) { SelectCamera(0); m_linkChecked = true; return 0; } return -1; }
int main( int argc, char ** argv) { uint32_t rtn = 0; uint32_t action = 0; CAMCameraListPtr pList = 0; CAMDeviceInfoPtr pDevInfo = 0; CAMHandle hCam = 0; CAMDevice device; OPTS opts; action = parse_options( &opts, argc, argv); if (!action) return 0; do { SetUsbDebug( verbose); rtn = InitUsb(); if (rtn) break; rtn = GetCameraList( &pList, (opts.flags & OPT_FORCE)); if (rtn) break; if (action == ACT_LIST_DEVICES) { list_devices( pList); break; } device = SelectCamera( &opts, pList); if (!device) break; if (action == ACT_DEVICE_RESET) { ResetCamera( device); break; } rtn = InitCamera( device, &hCam); if (rtn) break; rtn = GetDeviceInfo( hCam, &pDevInfo); if (rtn) break; switch (action) { case ACT_SHOW_INFO: show_info( pDevInfo); break; case ACT_LIST_OPERATIONS: list_operations( pDevInfo); break; case ACT_STORAGE_INFO: show_storage_info( hCam, pDevInfo); break; case ACT_LIST_PROPERTIES: list_properties( pDevInfo); break; case ACT_GETSET_PROPERTY: getset_property( hCam, pDevInfo, &opts); break; case ACT_LIST_FILES: list_files( hCam, pDevInfo); break; case ACT_LIST_HANDLES: list_handles( hCam, pDevInfo); break; case ACT_HANDLE_INFO: show_handle_info( hCam, pDevInfo, &opts); break; case ACT_GET_FILE: get_files( hCam, pDevInfo, &opts); break; case ACT_DELETE_FILE: delete_files( hCam, pDevInfo, &opts); break; } } while (0); if (rtn) camcli_error( GetErrorName( pDevInfo, rtn)); free( pDevInfo); free( pList); TermCamera( &hCam); TermUsb(); return 0; }