/home/users/builder/rpm/BUILD/alsa-lib-1.0.13/src/timer/timer_local.h

00001 /*
00002  *  Timer interface - local header file
00003  *  Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
00004  *
00005  *
00006  *   This library is free software; you can redistribute it and/or modify
00007  *   it under the terms of the GNU Lesser General Public License as
00008  *   published by the Free Software Foundation; either version 2.1 of
00009  *   the License, or (at your option) any later version.
00010  *
00011  *   This program is distributed in the hope that it will be useful,
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *   GNU Lesser General Public License for more details.
00015  *
00016  *   You should have received a copy of the GNU Lesser General Public
00017  *   License along with this library; if not, write to the Free Software
00018  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019  *
00020  */
00021 
00022 #include <stdio.h>
00023 #include <stdlib.h>
00024 #include <limits.h>
00025 #include "local.h"
00026 
00027 #ifndef DOC_HIDDEN
00028 typedef struct {
00029         int (*close)(snd_timer_t *timer);
00030         int (*nonblock)(snd_timer_t *timer, int nonblock);
00031         int (*async)(snd_timer_t *timer, int sig, pid_t pid);
00032         int (*info)(snd_timer_t *timer, snd_timer_info_t *info);
00033         int (*params)(snd_timer_t *timer, snd_timer_params_t *params);
00034         int (*status)(snd_timer_t *timer, snd_timer_status_t *status);
00035         int (*rt_start)(snd_timer_t *timer);
00036         int (*rt_stop)(snd_timer_t *timer);
00037         int (*rt_continue)(snd_timer_t *timer);
00038         ssize_t (*read)(snd_timer_t *timer, void *buffer, size_t size);
00039 } snd_timer_ops_t;
00040 
00041 struct _snd_timer {
00042         unsigned int version;
00043         void *dl_handle;
00044         char *name;
00045         snd_timer_type_t type;
00046         int mode;
00047         int poll_fd;
00048         snd_timer_ops_t *ops;
00049         void *private_data;
00050         struct list_head async_handlers;
00051 };
00052 
00053 typedef struct {
00054         int (*close)(snd_timer_query_t *timer);
00055         int (*next_device)(snd_timer_query_t *timer, snd_timer_id_t *tid);
00056         int (*info)(snd_timer_query_t *timer, snd_timer_ginfo_t *info);
00057         int (*params)(snd_timer_query_t *timer, snd_timer_gparams_t *info);
00058         int (*status)(snd_timer_query_t *timer, snd_timer_gstatus_t *info);
00059 } snd_timer_query_ops_t;
00060 
00061 struct _snd_timer_query {
00062         void *dl_handle;
00063         char *name;
00064         snd_timer_type_t type;
00065         int mode;
00066         int poll_fd;
00067         snd_timer_query_ops_t *ops;
00068         void *private_data;
00069 };
00070 #endif /* DOC_HIDDEN */
00071 
00072 int snd_timer_hw_open(snd_timer_t **handle, const char *name, int dev_class, int dev_sclass, int card, int device, int subdevice, int mode);
00073 
00074 int snd_timer_query_hw_open(snd_timer_query_t **handle, const char *name, int mode);
00075 
00076 int snd_timer_async(snd_timer_t *timer, int sig, pid_t pid);

Generated on Sun Apr 1 18:36:42 2007 for ALSA project - the C library reference by  doxygen 1.5.1