|
Packit |
ae235b |
/*******************************************************************************
|
|
Packit |
ae235b |
Copyright (c) 2011, 2012 Dmitry Matveev <me@dmitrymatveev.co.uk>
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
Packit |
ae235b |
of this software and associated documentation files (the "Software"), to deal
|
|
Packit |
ae235b |
in the Software without restriction, including without limitation the rights
|
|
Packit |
ae235b |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
Packit |
ae235b |
copies of the Software, and to permit persons to whom the Software is
|
|
Packit |
ae235b |
furnished to do so, subject to the following conditions:
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
The above copyright notice and this permission notice shall be included in
|
|
Packit |
ae235b |
all copies or substantial portions of the Software.
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
Packit |
ae235b |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
Packit |
ae235b |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
Packit |
ae235b |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
Packit |
ae235b |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
Packit |
ae235b |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
Packit |
ae235b |
THE SOFTWARE.
|
|
Packit |
ae235b |
*******************************************************************************/
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
#ifndef __KQUEUE_SUB_H
|
|
Packit |
ae235b |
#define __KQUEUE_SUB_H
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
#include "dep-list.h"
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
/**
|
|
Packit |
ae235b |
* kqueue_sub:
|
|
Packit |
ae235b |
* @filename: a name of the file to monitor
|
|
Packit |
ae235b |
* @user_data: the pointer to user data
|
|
Packit |
ae235b |
* @pair_moves: unused (currently not implemented)
|
|
Packit |
ae235b |
* @fd: the associated file descriptor (used by kqueue)
|
|
Packit |
ae235b |
*
|
|
Packit |
ae235b |
* Represents a subscription on a file or directory.
|
|
Packit |
ae235b |
*/
|
|
Packit |
ae235b |
typedef struct
|
|
Packit |
ae235b |
{
|
|
Packit |
ae235b |
gchar* filename;
|
|
Packit |
ae235b |
gpointer user_data;
|
|
Packit |
ae235b |
gboolean pair_moves;
|
|
Packit |
ae235b |
int fd;
|
|
Packit |
ae235b |
dep_list* deps;
|
|
Packit |
ae235b |
int is_dir;
|
|
Packit |
ae235b |
} kqueue_sub;
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
kqueue_sub* _kh_sub_new (const gchar* filename, gboolean pair_moves, gpointer user_data);
|
|
Packit |
ae235b |
void _kh_sub_free (kqueue_sub* sub);
|
|
Packit |
ae235b |
|
|
Packit |
ae235b |
#endif /* __KQUEUE_SUB_H */
|