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

int gp_list_new ( CameraList **  list  ) 

Creates a new CameraList.

Parameters:
list 
Returns:
a gphoto2 error code

Definition at line 118 of file gphoto2-list.c.

References CHECK_NULL, GP_ERROR_NO_MEMORY, and GP_OK.

Referenced by gp_camera_init(), gp_filesystem_number(), and gp_filesystem_remove_dir().

{
      CHECK_NULL (list);

      (*list) = malloc (sizeof (CameraList));
        if (!(*list))
            return (GP_ERROR_NO_MEMORY);
      memset ((*list), 0, sizeof (CameraList));

      (*list)->ref_count = 1;

      return (GP_OK);
}


Generated by  Doxygen 1.6.0   Back to index