Logo Search packages:      
Sourcecode: libgphoto2 version File versions  Download package

void gp_camera_stop_timeout ( Camera *  camera,
unsigned int  id 

gp_camera_stop_timeout: : a Camera : the id of the background process previously returned by gp_camera_start_timeout

Call this function in the camera driver if you want to stop a periodic call to a function that has been started using gp_camera_start_timeout.

Definition at line 1446 of file gphoto2-camera.c.

Referenced by gp_camera_exit().

      unsigned int i;

      if (!camera || !camera->pc)

      if (!camera->pc->timeout_stop_func)

      /* Check if we know this id. If yes, remove it. */
      for (i = 0; i < camera->pc->timeout_ids_len; i++)
            if (camera->pc->timeout_ids[i] == id)
      if (i == camera->pc->timeout_ids_len)
      memmove (camera->pc->timeout_ids + i, camera->pc->timeout_ids + i + 1,
             sizeof (int) * (camera->pc->timeout_ids_len - i - 1));
      camera->pc->timeout_ids = realloc (camera->pc->timeout_ids,
                        sizeof (int) * camera->pc->timeout_ids_len);

      camera->pc->timeout_stop_func (camera, id, camera->pc->timeout_data);

Generated by  Doxygen 1.6.0   Back to index