Add IsoImage context as parameter for return function.
This commit is contained in:
parent
f2c8712b40
commit
b3f4ca1cf7
@ -100,7 +100,7 @@ struct Iso_Image
|
|||||||
* @return
|
* @return
|
||||||
* 1 add, 0 ignore, < 0 cancel
|
* 1 add, 0 ignore, < 0 cancel
|
||||||
*/
|
*/
|
||||||
int (*report)(IsoFileSource *src);
|
int (*report)(IsoImage *image, IsoFileSource *src);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /*LIBISO_IMAGE_H_*/
|
#endif /*LIBISO_IMAGE_H_*/
|
||||||
|
@ -1768,7 +1768,7 @@ int iso_tree_get_ignore_special(IsoImage *image);
|
|||||||
* NULL is allowed if you don't want any callback.
|
* NULL is allowed if you don't want any callback.
|
||||||
*/
|
*/
|
||||||
void iso_tree_set_report_callback(IsoImage *image,
|
void iso_tree_set_report_callback(IsoImage *image,
|
||||||
int (*report)(IsoFileSource *src));
|
int (*report)(IsoImage*, IsoFileSource*));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a new node to the image tree, from an existing file.
|
* Add a new node to the image tree, from an existing file.
|
||||||
|
@ -345,7 +345,7 @@ int iso_tree_get_ignore_special(IsoImage *image)
|
|||||||
* NULL is allowed if you don't want any callback.
|
* NULL is allowed if you don't want any callback.
|
||||||
*/
|
*/
|
||||||
void iso_tree_set_report_callback(IsoImage *image,
|
void iso_tree_set_report_callback(IsoImage *image,
|
||||||
int (*report)(IsoFileSource *src))
|
int (*report)(IsoImage*, IsoFileSource*))
|
||||||
{
|
{
|
||||||
image->report = report;
|
image->report = report;
|
||||||
}
|
}
|
||||||
@ -544,7 +544,7 @@ int iso_add_dir_src_rec(IsoImage *image, IsoDir *parent, IsoFileSource *dir)
|
|||||||
|
|
||||||
/* if we are here we must insert. Give user a chance for cancel */
|
/* if we are here we must insert. Give user a chance for cancel */
|
||||||
if (image->report) {
|
if (image->report) {
|
||||||
int r = image->report(file);
|
int r = image->report(image, file);
|
||||||
if (r <= 0) {
|
if (r <= 0) {
|
||||||
ret = (r < 0 ? ISO_CANCELED : ISO_SUCCESS);
|
ret = (r < 0 ? ISO_CANCELED : ISO_SUCCESS);
|
||||||
goto dir_rec_continue;
|
goto dir_rec_continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user