/*************************************************************************** * Copyright (C) 2011 by Pierre Marchand * * pierre@oep-h.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program 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 General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include #include "orm.h" #include #include #include #include #include extern "C" { struct PTPParams; uint16_t ptp_chdk_exec_lua(PTPParams* params, char *script, uint32_t *ret); } ORM::ORM(const QString& leftPort, const QString& rightPort) { context = gp_context_new(); CameraList *list; if(gp_list_new(&list) == GP_OK) { int ccount = gp_camera_autodetect(list, context); const char *model, *port; GPPortInfoList *portinfolist = 0; gp_port_info_list_new(&portinfolist); gp_port_info_list_load(portinfolist); for(int i(0); i < ccount; i++) { gp_list_get_name (list, i, &model); gp_list_get_value (list, i, &port); std::cout<<"Found Camera ["<= GP_OK) std::cout<<"Init Camera Success"<(ptr), size).copy(); gp_file_free(file); return ret; // return QImage(QString("test.jpg")); }