25#ifndef LIBGPHOTO2_GPHOTO2_CONTEXT_H 
   26#define LIBGPHOTO2_GPHOTO2_CONTEXT_H 
   61typedef void (* GPContextIdleFunc)     (
GPContext *context, 
void *data);
 
   62typedef void (* GPContextErrorFunc)    (
GPContext *context, 
const char *text, 
void *data);
 
   63typedef void (* GPContextStatusFunc)   (
GPContext *context, 
const char *text, 
void *data);
 
   64typedef void (* GPContextMessageFunc)  (
GPContext *context, 
const char *text, 
void *data);
 
   66                                                     const char *text, 
void *data);
 
   69typedef unsigned int (* GPContextProgressStartFunc)  (
GPContext *context,
 
   73typedef void         (* GPContextProgressUpdateFunc) (
GPContext *context,
 
   77typedef void         (* GPContextProgressStopFunc)   (
GPContext *context,
 
   82void gp_context_set_idle_func      (
GPContext *context,
 
   83                                    GPContextIdleFunc func,     
void *data);
 
   84void gp_context_set_progress_funcs (
GPContext *context,
 
   85                                    GPContextProgressStartFunc  start_func,
 
   86                                    GPContextProgressUpdateFunc update_func,
 
   87                                    GPContextProgressStopFunc   stop_func,
 
   89void gp_context_set_error_func     (
GPContext *context,
 
   90                                    GPContextErrorFunc func,    
void *data);
 
   91void gp_context_set_status_func    (
GPContext *context,
 
   92                                    GPContextStatusFunc func,   
void *data);
 
   93void gp_context_set_question_func  (
GPContext *context,
 
   94                                    GPContextQuestionFunc func, 
void *data);
 
   95void gp_context_set_cancel_func    (
GPContext *context,
 
   96                                    GPContextCancelFunc func,   
void *data);
 
   97void gp_context_set_message_func   (
GPContext *context,
 
   98                                    GPContextMessageFunc func,  
void *data);
 
  102void gp_context_error    (
GPContext *context, 
const char *format, ...)
 
  104        __attribute__((__format__(printf,2,3)))
 
  107void gp_context_status   (
GPContext *context, 
const char *format, ...)
 
  109        __attribute__((__format__(printf,2,3)))
 
  114        __attribute__((__format__(printf,2,3)))
 
  120        __attribute__((__format__(printf,2,3)))
 
  125                                         const char *format, ...)
 
  127        __attribute__((__format__(printf,3,4)))
 
  130void         gp_context_progress_update (
GPContext *context, 
unsigned int id,
 
  132void         gp_context_progress_stop   (
GPContext *context, 
unsigned int id);
 
GPContextFeedback gp_context_question(GPContext *context, const char *format,...)
Ask frontend user a question.
Definition gphoto2-context.c:291
GPContextFeedback gp_context_cancel(GPContext *context)
Definition gphoto2-context.c:323
struct _GPContext GPContext
The gphoto context structure.
Definition gphoto2-context.h:41
enum _GPContextFeedback GPContextFeedback
Return codes that can be returned by progress handling.
unsigned int gp_context_progress_start(GPContext *context, float target, const char *format,...)
Start progress tracking.
Definition gphoto2-context.c:155
void gp_context_ref(GPContext *context)
Definition gphoto2-context.c:93
void gp_context_message(GPContext *context, const char *format,...)
Print a message to the context.
Definition gphoto2-context.c:257
void gp_context_unref(GPContext *context)
Decrements reference count of a context.
Definition gphoto2-context.c:115
GPContext * gp_context_new(void)
Creates a new context.
Definition gphoto2-context.c:74
_GPContextFeedback
Return codes that can be returned by progress handling.
Definition gphoto2-context.h:55
@ GP_CONTEXT_FEEDBACK_OK
Definition gphoto2-context.h:56
@ GP_CONTEXT_FEEDBACK_CANCEL
Definition gphoto2-context.h:57
void gp_context_idle(GPContext *context)
Notify frontend of a brief idle time.
Definition gphoto2-context.c:135
Definition gphoto2-context.c:39