[totem-pl-parser/wip/hadess/async-save: 5/10] plparser: Make save implementation accept GCancellable



commit 859a5aa3c86bfcaa061ac0486bfd04a7020056a3
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Feb 27 15:57:14 2020 +0100

    plparser: Make save implementation accept GCancellable

 plparse/totem-pl-parser-lines.c | 1 +
 plparse/totem-pl-parser-lines.h | 1 +
 plparse/totem-pl-parser-pla.c   | 1 +
 plparse/totem-pl-parser-pla.h   | 1 +
 plparse/totem-pl-parser-pls.c   | 1 +
 plparse/totem-pl-parser-pls.h   | 1 +
 plparse/totem-pl-parser-xspf.c  | 1 +
 plparse/totem-pl-parser-xspf.h  | 1 +
 plparse/totem-pl-parser.c       | 7 ++++---
 9 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/plparse/totem-pl-parser-lines.c b/plparse/totem-pl-parser-lines.c
index 89e6469..5791641 100644
--- a/plparse/totem-pl-parser-lines.c
+++ b/plparse/totem-pl-parser-lines.c
@@ -84,6 +84,7 @@ totem_pl_parser_save_m3u (TotemPlParser    *parser,
                           TotemPlPlaylist  *playlist,
                           GFile            *output,
                           gboolean          dos_compatible,
+                          GCancellable     *cancellable,
                           GError          **error)
 {
         TotemPlPlaylistIter iter;
diff --git a/plparse/totem-pl-parser-lines.h b/plparse/totem-pl-parser-lines.h
index 550e17d..2a89665 100644
--- a/plparse/totem-pl-parser-lines.h
+++ b/plparse/totem-pl-parser-lines.h
@@ -40,6 +40,7 @@ gboolean totem_pl_parser_save_m3u (TotemPlParser *parser,
                                    TotemPlPlaylist *playlist,
                                    GFile *output,
                                    gboolean dos_compatible,
+                                   GCancellable *cancellable,
                                    GError **error);
 
 TotemPlParserResult totem_pl_parser_add_ram (TotemPlParser *parser,
diff --git a/plparse/totem-pl-parser-pla.c b/plparse/totem-pl-parser-pla.c
index bc4f51f..1275b37 100644
--- a/plparse/totem-pl-parser-pla.c
+++ b/plparse/totem-pl-parser-pla.c
@@ -48,6 +48,7 @@ totem_pl_parser_save_pla (TotemPlParser    *parser,
                           TotemPlPlaylist  *playlist,
                           GFile            *output,
                           const char       *title,
+                          GCancellable     *cancellable,
                           GError          **error)
 {
         TotemPlPlaylistIter iter;
diff --git a/plparse/totem-pl-parser-pla.h b/plparse/totem-pl-parser-pla.h
index d5081a3..37d3cfa 100644
--- a/plparse/totem-pl-parser-pla.h
+++ b/plparse/totem-pl-parser-pla.h
@@ -37,6 +37,7 @@ gboolean totem_pl_parser_save_pla                             (TotemPlParser *parser,
                                                                  TotemPlPlaylist *playlist,
                                                                 GFile *output,
                                                                 const char *title,
+                                                                GCancellable *cancellable,
                                                                 GError **error);
 
 TotemPlParserResult totem_pl_parser_add_pla                    (TotemPlParser *parser,
diff --git a/plparse/totem-pl-parser-pls.c b/plparse/totem-pl-parser-pls.c
index bbac1b7..a6f25be 100644
--- a/plparse/totem-pl-parser-pls.c
+++ b/plparse/totem-pl-parser-pls.c
@@ -40,6 +40,7 @@ totem_pl_parser_save_pls (TotemPlParser    *parser,
                           TotemPlPlaylist  *playlist,
                           GFile            *output,
                           const gchar      *title,
+                          GCancellable     *cancellable,
                           GError          **error)
 {
         TotemPlPlaylistIter iter;
diff --git a/plparse/totem-pl-parser-pls.h b/plparse/totem-pl-parser-pls.h
index 6de1b88..393ab75 100644
--- a/plparse/totem-pl-parser-pls.h
+++ b/plparse/totem-pl-parser-pls.h
@@ -36,6 +36,7 @@ gboolean totem_pl_parser_save_pls                             (TotemPlParser *parser,
                                                                  TotemPlPlaylist *playlist,
                                                                 GFile *file,
                                                                 const char *title,
+                                                                GCancellable *cancellable,
                                                                 GError **error);
 TotemPlParserResult totem_pl_parser_add_pls_with_contents      (TotemPlParser *parser,
                                                                 GFile *file,
diff --git a/plparse/totem-pl-parser-xspf.c b/plparse/totem-pl-parser-xspf.c
index c0d818b..7cfe535 100644
--- a/plparse/totem-pl-parser-xspf.c
+++ b/plparse/totem-pl-parser-xspf.c
@@ -100,6 +100,7 @@ totem_pl_parser_save_xspf (TotemPlParser    *parser,
                            TotemPlPlaylist  *playlist,
                            GFile            *output,
                            const char       *title,
+                           GCancellable     *cancellable,
                            GError          **error)
 {
         TotemPlPlaylistIter iter;
diff --git a/plparse/totem-pl-parser-xspf.h b/plparse/totem-pl-parser-xspf.h
index 64039cd..b0457ee 100644
--- a/plparse/totem-pl-parser-xspf.h
+++ b/plparse/totem-pl-parser-xspf.h
@@ -37,6 +37,7 @@ gboolean totem_pl_parser_save_xspf (TotemPlParser *parser,
                                     TotemPlPlaylist *playlist,
                                     GFile *output,
                                     const char *title,
+                                    GCancellable *cancellable,
                                     GError **error);
 
 TotemPlParserResult totem_pl_parser_add_xspf_with_contents (TotemPlParser *parser,
diff --git a/plparse/totem-pl-parser.c b/plparse/totem-pl-parser.c
index 2909504..a5a9740 100644
--- a/plparse/totem-pl-parser.c
+++ b/plparse/totem-pl-parser.c
@@ -1152,16 +1152,17 @@ totem_pl_parser_save (TotemPlParser      *parser,
         switch (type)
         {
        case TOTEM_PL_PARSER_PLS:
-               return totem_pl_parser_save_pls (parser, playlist, dest, title, error);
+               return totem_pl_parser_save_pls (parser, playlist, dest, title, NULL, error);
        case TOTEM_PL_PARSER_M3U:
        case TOTEM_PL_PARSER_M3U_DOS:
                return totem_pl_parser_save_m3u (parser, playlist, dest,
                                                  (type == TOTEM_PL_PARSER_M3U_DOS),
+                                                 NULL,
                                                  error);
        case TOTEM_PL_PARSER_XSPF:
-               return totem_pl_parser_save_xspf (parser, playlist, dest, title, error);
+               return totem_pl_parser_save_xspf (parser, playlist, dest, title, NULL, error);
        case TOTEM_PL_PARSER_IRIVER_PLA:
-               return totem_pl_parser_save_pla (parser, playlist, dest, title, error);
+               return totem_pl_parser_save_pla (parser, playlist, dest, title, NULL, error);
        default:
                g_assert_not_reached ();
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]