abilities accomodated to the new API
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@845 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -28,6 +28,7 @@ Changes
|
||||
-------
|
||||
* 5 August, 2000
|
||||
- filename based communication between library and core
|
||||
- abilities accomodated to the new API
|
||||
|
||||
* 28 July, 2000
|
||||
- added library for DC1000 series
|
||||
@@ -46,6 +47,7 @@ Changes
|
||||
To be done
|
||||
----------
|
||||
|
||||
* Test DC1000 model.
|
||||
* Setting the time and date of camera.
|
||||
* Writing manual.
|
||||
|
||||
|
||||
@@ -320,29 +320,31 @@ int camera_id (CameraText *id) {
|
||||
return (GP_OK);
|
||||
}
|
||||
|
||||
int camera_abilities (CameraAbilities *abilities, int *count) {
|
||||
int camera_abilities (CameraAbilitiesList *list) {
|
||||
|
||||
*count = 1;
|
||||
CameraAbilities *a;
|
||||
|
||||
/* Fill in each camera model's abilities */
|
||||
/* Make separate entries for each conneciton type (usb, serial, etc...)
|
||||
if a camera supported multiple ways. */
|
||||
if (!(a = gp_abilities_new()))
|
||||
return GP_ERROR;
|
||||
|
||||
strcpy(abilities[0].model, "Panasonic DC1000");
|
||||
abilities[0].port = GP_PORT_SERIAL;
|
||||
abilities[0].speed[0] = 9600;
|
||||
abilities[0].speed[1] = 19200;
|
||||
abilities[0].speed[2] = 38400;
|
||||
abilities[0].speed[3] = 57600;
|
||||
abilities[0].speed[4] = 115200;
|
||||
abilities[0].speed[5] = 0;
|
||||
abilities[0].capture = 0;
|
||||
abilities[0].config = 0;
|
||||
abilities[0].file_delete = 1;
|
||||
abilities[0].file_preview = 0;
|
||||
abilities[0].file_put = 1;
|
||||
strcpy(a->model, "Panasonic DC1000");
|
||||
a->port = GP_PORT_SERIAL;
|
||||
a->speed[0] = 9600;
|
||||
a->speed[1] = 19200;
|
||||
a->speed[2] = 38400;
|
||||
a->speed[3] = 57600;
|
||||
a->speed[4] = 115200;
|
||||
a->speed[5] = 0;
|
||||
a->capture = 0;
|
||||
a->config = 0;
|
||||
a->file_delete = 1;
|
||||
a->file_preview = 0;
|
||||
a->file_put = 1;
|
||||
|
||||
return (GP_OK);
|
||||
if (gp_abilities_list_append(list, a) == GP_ERROR)
|
||||
return GP_ERROR;
|
||||
|
||||
return GP_OK;
|
||||
}
|
||||
|
||||
int camera_init (Camera *camera, CameraInit *init) {
|
||||
|
||||
@@ -404,43 +404,38 @@ int camera_id (CameraText *id) {
|
||||
return (GP_OK);
|
||||
}
|
||||
|
||||
int camera_abilities (CameraAbilities *abilities, int *count) {
|
||||
int camera_abilities (CameraAbilitiesList *list) {
|
||||
|
||||
*count = 2;
|
||||
CameraAbilities *a;
|
||||
char *models[] = {
|
||||
"Panasonic DC1580",
|
||||
"Nikon CoolPix 600",
|
||||
NULL };
|
||||
int i;
|
||||
|
||||
/* Fill in each camera model's abilities */
|
||||
/* Make separate entries for each conneciton type (usb, serial, etc...)
|
||||
if a camera supported multiple ways. */
|
||||
while (models[i]) {
|
||||
if (!(a = gp_abilities_new()))
|
||||
return GP_ERROR;
|
||||
strcpy(a->model, models[1]);
|
||||
a->port = GP_PORT_SERIAL;
|
||||
a->speed[0] = 9600;
|
||||
a->speed[1] = 19200;
|
||||
a->speed[2] = 38400;
|
||||
a->speed[3] = 57600;
|
||||
a->speed[4] = 115200;
|
||||
a->speed[5] = 0;
|
||||
a->capture = 0;
|
||||
a->config = 0;
|
||||
a->file_delete = 1;
|
||||
a->file_preview = 1;
|
||||
a->file_put = 1;
|
||||
|
||||
strcpy(abilities[0].model, "Panasonic DC1580");
|
||||
abilities[0].port = GP_PORT_SERIAL;
|
||||
abilities[0].speed[0] = 9600;
|
||||
abilities[0].speed[1] = 19200;
|
||||
abilities[0].speed[2] = 38400;
|
||||
abilities[0].speed[3] = 57600;
|
||||
abilities[0].speed[4] = 115200;
|
||||
abilities[0].speed[5] = 0;
|
||||
abilities[0].capture = 0;
|
||||
abilities[0].config = 0;
|
||||
abilities[0].file_delete = 1;
|
||||
abilities[0].file_preview = 1;
|
||||
abilities[0].file_put = 1;
|
||||
|
||||
strcpy(abilities[1].model, "Nikon CoolPix 600");
|
||||
abilities[1].port = GP_PORT_SERIAL;
|
||||
abilities[1].speed[1] = 9600;
|
||||
abilities[1].speed[1] = 19200;
|
||||
abilities[1].speed[2] = 38400;
|
||||
abilities[1].speed[3] = 57600;
|
||||
abilities[1].speed[4] = 115200;
|
||||
abilities[1].speed[5] = 0;
|
||||
abilities[1].capture = 0;
|
||||
abilities[1].config = 0;
|
||||
abilities[1].file_delete = 1;
|
||||
abilities[1].file_preview = 1;
|
||||
abilities[1].file_put = 1;
|
||||
if (gp_abilities_list_append(list, a) == GP_ERROR)
|
||||
return GP_ERROR;
|
||||
i++;
|
||||
}
|
||||
|
||||
return (GP_OK);
|
||||
return GP_OK;
|
||||
}
|
||||
|
||||
int camera_init (Camera *camera, CameraInit *init) {
|
||||
|
||||
Reference in New Issue
Block a user