2 * Copyright 2013 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
21 #ifndef _MF_CANCEL_DEF_H_
22 #define _MF_CANCEL_DEF_H_
28 * <structname>mf_cancel</structname> is an opaque structure whose members
29 * cannot be accessed directly.
31 typedef struct _mf_cancel mf_cancel;
41 * Creates a new #mf_cancel.
42 * Return value: This function returns a new #mf_cancel on success, or %NULL.
44 mf_cancel *mf_cancel_new(void);
48 * @cancel : a #mf_cancel
49 * Release all allocated memory for @cancel.
51 void mf_cancel_free(mf_cancel *cancel);
54 * mf_cancel_do_cancel:
55 * @cancel : a #mf_cancel
56 * Request to cancel operation related on @cancel.
57 * This function should be called by conductor at most case
59 void mf_cancel_do_cancel(mf_cancel *cancel);
62 * mf_cancel_check_cancel:
63 * Check request of @cancel
64 * Return value: This function returns TRUE, if cancel is requested, or FALSE.
66 gboolean mf_cancel_check_cancel(mf_cancel *cancel);
69 * mf_cancel_is_cancelled:
70 * Check status of @cancel
71 * Return value: This function returns TRUE, if cancel is done, or FALSE.
73 gboolean mf_cancel_is_cancelled(mf_cancel *cancel);
77 * mf_cancel_set_cancelled:
78 * set status of @cancel after cancel is done
79 * This function should be called by operator
81 void mf_cancel_set_cancelled(mf_cancel *cancel);