LIRC libraries
LinuxInfraredRemoteControl
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
lirc_client.c File Reference

(9c596ec 2015-02-10 14:16:32 +0100)

Implements lirc_client.h. More...

#include <errno.h>
#include <libgen.h>
#include <limits.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <strings.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/un.h>
#include <unistd.h>
#include "lirc_client.h"

Go to the source code of this file.

Macros

#define logprintf(level, fmt, args...)   syslog(level, fmt, ## args)
 
#define LIRC_WARNING   LOG_WARNING
 
#define LIRC_DEBUG   LOG_DEBUG
 
#define LIRC_NOTICE   LOG_NOTICE
 
#define LIRC_ERROR   LOG_ERR
 
#define MAX_INCLUDES   10
 
#define LIRC_READ   255
 
#define LIRC_PACKET_SIZE   255
 
#define LIRC_TIMEOUT   3
 

Enumerations

enum  packet_state {
  P_BEGIN, P_MESSAGE, P_STATUS, P_DATA,
  P_N, P_DATA_N, P_END
}
 

Functions

unsigned int lirc_flags (char *string)
 
int lirc_command_init (lirc_cmd_ctx *ctx, const char *fmt,...)
 
void lirc_command_reply_to_stdout (lirc_cmd_ctx *ctx)
 
int lirc_command_run (lirc_cmd_ctx *ctx, int fd)
 
int lirc_init (const char *prog, int verbose)
 
int lirc_deinit (void)
 
int lirc_mode (char *token, char *token2, char **mode, struct lirc_config_entry **new_config, struct lirc_config_entry **first_config, struct lirc_config_entry **last_config, int(check)(char *s), const char *name, int line)
 
int lirc_identify (int sockfd)
 
int lirc_readconfig (const char *file, struct lirc_config **config, int(check)(char *s))
 
int lirc_readconfig_only (const char *file, struct lirc_config **config, int(check)(char *s))
 
void lirc_freeconfig (struct lirc_config *config)
 
char * lirc_ir2char (struct lirc_config *config, char *code)
 
int lirc_code2char (struct lirc_config *config, char *code, char **string)
 
int lirc_code2charprog (struct lirc_config *config, char *code, char **string, char **prog)
 
char * lirc_nextir (void)
 
int lirc_nextcode (char **code)
 
size_t lirc_getsocketname (const char *id, char *buf, size_t size)
 
const char * lirc_getmode (struct lirc_config *config)
 
const char * lirc_setmode (struct lirc_config *config, const char *mode)
 
int lirc_send_one (int fd, const char *remote, const char *keysym)
 
int lirc_simulate (int fd, const char *remote, const char *keysym, int scancode, int repeat)
 
int lirc_get_local_socket (const char *path, int quiet)
 
int lirc_get_remote_socket (const char *address, int port, int quiet)
 

Variables

char * prog
 

Detailed Description

Implements lirc_client.h.

Author
Christoph Bartelmus, Trent Piepho, Michal Svec

Definition in file lirc_client.c.

Enumeration Type Documentation

protocol state.

Definition at line 70 of file lirc_client.c.