Logo Search packages:      
Sourcecode: libgphoto2 version File versions  Download package

gphoto2-port-log.c File Reference


Detailed Description

Author:
Copyright 2001 Lutz Müller <lutz@users.sf.net>
License
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Definition in file gphoto2-port-log.c.

#include "config.h"
#include <gphoto2/gphoto2-port-log.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <gphoto2/gphoto2-port-result.h>

Go to the source code of this file.

Classes

struct  LogFunc
 Internal logging function entry. More...

Defines

#define _(String)   (String)
#define HEXDUMP_BLOCK_DISTANCE   2
#define HEXDUMP_COMPLETE_LINE
#define HEXDUMP_INIT_X   (HEXDUMP_OFFSET_WIDTH + HEXDUMP_BLOCK_DISTANCE)
#define HEXDUMP_INIT_Y   (HEXDUMP_INIT_X + 3 * 16 - 1 + HEXDUMP_BLOCK_DISTANCE)
#define HEXDUMP_LINE_WIDTH   (HEXDUMP_INIT_Y + 16)
#define HEXDUMP_MIDDLE   (HEXDUMP_INIT_X + 3 * 8 - 1)
#define HEXDUMP_OFFSET_WIDTH   4
#define N_(String)   (String)

Functions

void gp_log (GPLogLevel level, const char *domain, const char *format,...)
 Log a debug or error message.
int gp_log_add_func (GPLogLevel level, GPLogFunc func, void *data)
 Add a function to get logging information.
void gp_log_data (const char *domain, const char *data, unsigned int size)
 Log data.
int gp_log_remove_func (int id)
 Remove a logging receiving function.
void gp_logv (GPLogLevel level, const char *domain, const char *format, va_list args)
 Log a debug or error message with va_list.

Variables

static LogFunclog_funcs = NULL
static unsigned int log_funcs_count = 0


Generated by  Doxygen 1.6.0   Back to index