| 1 |
/* |
| 2 |
* fm-simple-job.h |
| 3 |
* |
| 4 |
* Copyright 2010 Hong Jen Yee (PCMan) <[email protected]> |
| 5 |
* |
| 6 |
* This file is a part of the Libfm library. |
| 7 |
* |
| 8 |
* This library is free software; you can redistribute it and/or |
| 9 |
* modify it under the terms of the GNU Lesser General Public |
| 10 |
* License as published by the Free Software Foundation; either |
| 11 |
* version 2.1 of the License, or (at your option) any later version. |
| 12 |
* |
| 13 |
* This library is distributed in the hope that it will be useful, |
| 14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 |
* Lesser General Public License for more details. |
| 17 |
* |
| 18 |
* You should have received a copy of the GNU Lesser General Public |
| 19 |
* License along with this library; if not, write to the Free Software |
| 20 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 21 |
*/ |
| 22 |
|
| 23 |
|
| 24 |
#ifndef __FM_SIMPLE_JOB_H__ |
| 25 |
#define __FM_SIMPLE_JOB_H__ |
| 26 |
|
| 27 |
#include "fm-job.h" |
| 28 |
|
| 29 |
G_BEGIN_DECLS |
| 30 |
|
| 31 |
/** |
| 32 |
* FmSimpleJobFunc |
| 33 |
* @job: the job object |
| 34 |
* @user_data: user data provided on fm_simple_job_new() call |
| 35 |
* |
| 36 |
* The user function which will be ran asynchronously by #FmJob API. |
| 37 |
* |
| 38 |
* Return value: value to return from fm_job_run_sync(). |
| 39 |
*/ |
| 40 |
typedef gboolean (*FmSimpleJobFunc)(FmJob* job, gpointer user_data); |
| 41 |
|
| 42 |
GType fm_simple_job_get_type(void); |
| 43 |
FmJob* fm_simple_job_new(FmSimpleJobFunc func, gpointer user_data, GDestroyNotify destroy_data); |
| 44 |
|
| 45 |
G_END_DECLS |
| 46 |
|
| 47 |
#endif /* __FM_SIMPLE_JOB_H__ */ |