gphoto2-abilities-list.c File Reference

List of supported camera models including their abilities. More...

#include "config.h"
#include <gphoto2/gphoto2-abilities-list.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ltdl.h>
#include <gphoto2/gphoto2-result.h>
#include <gphoto2/gphoto2-port-log.h>
#include <gphoto2/gphoto2-library.h>

Include dependency graph for gphoto2-abilities-list.c:


Defines

#define textdomain(String)   (String)
#define gettext(String)   (String)
#define dgettext(Domain, Message)   (Message)
#define dcgettext(Domain, Message, Type)   (Message)
#define bindtextdomain(Domain, Directory)   (Domain)
#define bind_textdomain_codeset(Domain, Charset)   (Domain)
#define _(String)   (String)
#define N_(String)   (String)
#define GP_MODULE   "gphoto2-abilities-list"
#define CHECK_NULL(r)   {if (!(r)) return (GP_ERROR_BAD_PARAMETERS);}
#define CHECK_RESULT(result)   {int r = (result); if (r < 0) return (r);}
#define CHECK_MEM(m)   {if (!(m)) return (GP_ERROR_NO_MEMORY);}

Functions

const char * gp_message_codeset (const char *codeset)
 Set the current character codeset libgphoto2 is operating in.
int gp_abilities_list_new (CameraAbilitiesList **list)
 Allocate the memory for a new abilities list.
int gp_abilities_list_free (CameraAbilitiesList *list)
 Free the given CameraAbilitiesList object.
int gp_abilities_list_load (CameraAbilitiesList *list, GPContext *context)
 Scans the system for camera drivers.
int gp_abilities_list_detect (CameraAbilitiesList *list, GPPortInfoList *info_list, CameraList *l, GPContext *context)
int gp_abilities_list_append (CameraAbilitiesList *list, CameraAbilities abilities)
 Append the abilities to the list.
int gp_abilities_list_reset (CameraAbilitiesList *list)
 Reset the list.
int gp_abilities_list_count (CameraAbilitiesList *list)
 Count the entries in the supplied list.
int gp_abilities_list_lookup_model (CameraAbilitiesList *list, const char *model)
 Search the list for an entry of given model name.
int gp_abilities_list_get_abilities (CameraAbilitiesList *list, int index, CameraAbilities *abilities)
 Retrieve the camera abilities of entry with supplied index number.

Detailed Description

List of supported camera models including their abilities.

Author:
Copyright 2000 Scott Fritzinger
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Function Documentation

int gp_abilities_list_append ( CameraAbilitiesList list,
CameraAbilities  abilities 
)

Append the abilities to the list.

Parameters:
list CameraAbilitiesList
abilities CameraAbilities
Returns:
a gphoto2 error code
This function is called by a camera library on camera_abilities() in order to inform libgphoto2 about a supported camera model.

int gp_abilities_list_count ( CameraAbilitiesList list  ) 

Count the entries in the supplied list.

Parameters:
list a CameraAbilitiesList
Returns:
The number of entries or a gphoto2 error code

int gp_abilities_list_detect ( CameraAbilitiesList list,
GPPortInfoList *  info_list,
CameraList l,
GPContext context 
)

Parameters:
list a CameraAbilitiesList
info_list the GPPortInfoList of ports to use for detection
l a CameraList that contains the autodetected cameras after the call
context a GPContext
Tries to detect any camera connected to the computer using the supplied list of supported cameras and the supplied info_list of ports.

Returns:
a gphoto2 error code

int gp_abilities_list_free ( CameraAbilitiesList list  ) 

Free the given CameraAbilitiesList object.

Parameters:
list a CameraAbilitiesList
Returns:
a gphoto2 error code

int gp_abilities_list_get_abilities ( CameraAbilitiesList list,
int  index,
CameraAbilities abilities 
)

Retrieve the camera abilities of entry with supplied index number.

Parameters:
list a CameraAbilitiesList
index index
abilities pointer to CameraAbilities for returned data.
Returns:
a gphoto2 error code
Retrieves the camera abilities of entry with supplied index number. Typically, you would call gp_camera_set_abilities() afterwards in order to prepare the initialization of a camera.

int gp_abilities_list_load ( CameraAbilitiesList list,
GPContext context 
)

Scans the system for camera drivers.

Parameters:
list a CameraAbilitiesList
context a GPContext
Returns:
a gphoto2 error code
All supported camera models will then be added to the list.

int gp_abilities_list_lookup_model ( CameraAbilitiesList list,
const char *  model 
)

Search the list for an entry of given model name.

Parameters:
list a CameraAbilitiesList
model a camera model name
Returns:
Index of entry or gphoto2 error code

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.

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

int gp_abilities_list_reset ( CameraAbilitiesList list  ) 

Reset the list.

Parameters:
list a CameraAbilitiesList
Returns:
a gphoto2 error code

const char* gp_message_codeset ( const char *  codeset  ) 

Set the current character codeset libgphoto2 is operating in.

Set the codeset for all messages returned by libgphoto2.

Parameters:
codeset New codeset for the messages. For instance "utf-8".
Returns:
old codeset as returned from bind_textdomain_codeset().
You would then call gp_abilities_list_load() in order to populate it.


Generated on Sun Jul 22 19:29:35 2007 for libgphoto2 photo camera library (libgphoto2) by  doxygen 1.5.0