gphoto2pp
A C++ Wrapper for libgphoto2
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
gphoto2pp Namespace Reference

Namespaces

namespace  context
namespace  exceptions
namespace  helper
namespace  observer

Classes

class  CameraAbilitiesListWrapper
struct  CameraFilePathWrapper
class  CameraFileWrapper
class  CameraListWrapper
class  CameraWidgetWrapper
class  CameraWrapper
class  ChoicesWidget
class  DateWidget
class  FloatWidget
class  GPPortInfoListWrapper
class  IntWidget
class  MenuWidget
class  NonValueWidget
class  RadioWidget
class  RangeWidget
struct  RangeWidgetRange
class  SectionWidget
class  StringWidget
class  TextWidget
class  ToggleWidget
class  ValueWidgetBase
class  WindowWidget

Enumerations

enum  CameraCaptureTypeWrapper
enum  CameraEventTypeWrapper
enum  CameraFileTypeWrapper
enum  CameraWidgetTypeWrapper

Functions

std::shared_ptr
< gphoto2::_GPContext > 
getContext ()
 Creates a shared pointer of GPContext to be used anywhere in the program. Passes in a deleter method which will free the context on destruction.
std::pair< std::string,
std::string > 
autoDetect ()
 Finds the first available and recognized camera type connected to the computer.
CameraListWrapper autoDetectAll ()
 Finds all attached and recognized camera types connected to the computer.
int checkResponse (int result, std::string &&methodName)
 Helper used to validate the response of gphoto2 methods. when GP_ error codes are < 0, this method will create a gphoto2_exception.
int checkResponseSilent (int result, std::string &&methodName)
 Helper used to validate the response of gphoto2 methods, but does not throw an exception (logs the error instead)
std::string LibraryVersion (bool verbose=false)
 Returns the version of gphoto library currently linked in the system.

Enumeration Type Documentation

Provides a C++ enum for the gphoto2 CameraCaptureType enum

Provides a C++ enum for the gphoto2 CameraEventType enum

Provides a C++ enum for the gphoto2 CameraFileType enum

Provides a C++ enum for the gphoto2 CameraWidgetType enum

Function Documentation

std::pair< std::string, std::string > gphoto2pp::autoDetect ( )

Finds the first available and recognized camera type connected to the computer.

Returns
the model and port of the first camera found
Exceptions
GPhoto2pp::exceptions::NoCameraFoundErrorif it didn't find any cameras
CameraListWrapper gphoto2pp::autoDetectAll ( )

Finds all attached and recognized camera types connected to the computer.

Returns
a list of all cameras found
Exceptions
GPhoto2pp::exceptions::NoCameraFoundErrorif it didn't find any cameras
int gphoto2pp::checkResponse ( int  result,
std::string &&  methodName 
)

Helper used to validate the response of gphoto2 methods. when GP_ error codes are < 0, this method will create a gphoto2_exception.

Parameters
[in]resultof the gphoto2 method
[in]methodNameof the gphoto2 method that was called
Returns
the integer result returned from all gphoto2 methods. All results < 0 will be caught and thrown in the exception type. Some gphoto2 methods return the count of items, and so values > 0 can be returned and unrelated to error codes
Exceptions
GPhoto2pp::exceptions::gphoto2_exception
int gphoto2pp::checkResponseSilent ( int  result,
std::string &&  methodName 
)

Helper used to validate the response of gphoto2 methods, but does not throw an exception (logs the error instead)

Parameters
[in]resultof the gphoto2 method
[in]methodNameof the gphoto2 method that was called
Returns
the integer result returned from all gphoto2 methods. This is usually <= 0 (gphoto2 error codes), but some methods return the count of items, and so values > 0 can be returned and unrelated to error codes
std::shared_ptr< gphoto2::_GPContext > gphoto2pp::getContext ( )

Creates a shared pointer of GPContext to be used anywhere in the program. Passes in a deleter method which will free the context on destruction.

Returns
the new context ready for usage
Exceptions
GPhoto2pp::exceptions::NoCameraFoundErrorif it didn't find any cameras
std::string gphoto2pp::LibraryVersion ( bool  verbose = false)

Returns the version of gphoto library currently linked in the system.

Parameters
[in]verboseresponse, set to true, otherwise set to false
Note
Direct wrapper for gp_library_version(...)