Files
libgphoto2/examples/samples.h
Hans Ulrich Niedermann 0dbeaf7cbf Use consistently named non-reserved CPP macros for header files
C preprocessor macros beginning/ending with underscores are
reserved for system use as well as macros containing a double
underscore anywhere, so application software macros are
supposed to be named differently.

For a header file gphoto2-abilities-list.h, this
consistently uses a macro name
LIBGPHOTO2_GPHOTO2_ABILITIES_LIST_H
for the usual

    #ifndef LIBGPHOTO2_GPHOTO2_ABILITIES_LIST_H
    #define LIBGPHOTO2_GPHOTO2_ABILITIES_LIST_H
    ... content of the header file ...
    #endif /* !defined(LIBGPHOTO2_GPHOTO2_ABILITIES_LIST_H) */

Found using "clang -Weverything".

This should work, unless when run with an ancient C preprocessor
which might only the first 8 or 10 characters to distinguish
macro names and ignores the remainder of the name.
2021-10-05 16:07:20 +02:00

32 lines
1.0 KiB
C

#ifndef LIBGPHOTO2_SAMPLES_H
#define LIBGPHOTO2_SAMPLES_H
#include <gphoto2/gphoto2-camera.h>
#ifdef __cplusplus
extern "C" {
#endif
extern int sample_autodetect (CameraList *list, GPContext *context);
extern int sample_open_camera (Camera ** camera, const char *model, const char *port, GPContext *context);
extern GPContext* sample_create_context(void);
extern int get_config_value_string (Camera *, const char *, char **, GPContext *);
extern int set_config_value_string (Camera *, const char *, const char *, GPContext *);
int canon_enable_capture (Camera *camera, int onoff, GPContext *context);
extern int camera_auto_focus (Camera *list, GPContext *context, int onoff);
extern int camera_eosviewfinder (Camera *list, GPContext *context, int onoff);
extern int camera_manual_focus (Camera *list, int tgt, GPContext *context);
#if !defined (O_BINARY)
/*To have portable binary open() on *nix and on Windows */
#define O_BINARY 0
#endif
#ifdef __cplusplus
};
#endif
#endif /* !defined(LIBGPHOTO2_SAMPLES_H) */