Logo Search packages:      
Sourcecode: libgphoto2 version File versions

int gp_abilities_list_new ( CameraAbilitiesList **  list  ) 

Allocate the memory for a new abilities list.

Function to allocate the memory for a new abilities list.

list CameraAbilitiesList object to initialize
gphoto2 error code
You would then call gp_abilities_list_load() in order to populate it.

Definition at line 107 of file gphoto2-abilities-list.c.

References CHECK_MEM, CHECK_NULL, and GP_OK.

Referenced by gp_camera_init().

      CHECK_NULL (list);

       * We do this here because everybody needs to call this function
       * first before accessing a camera. Pretty ugly, but I don't know
       * an other way without introducing a global initialization
       * function...
      bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);

      CHECK_MEM (*list = malloc (sizeof (CameraAbilitiesList)));
      memset (*list, 0, sizeof (CameraAbilitiesList));

      return (GP_OK);

Generated by  Doxygen 1.6.0   Back to index