[gnome-builder/wip/libide: 108/237] libide: stub API for diagnostic provider



commit ecfe0e9879c7b980c7e356fd1c038267c0da6c08
Author: Christian Hergert <christian hergert me>
Date:   Wed Feb 11 19:12:27 2015 -0800

    libide: stub API for diagnostic provider

 libide/ide-diagnostic-provider.c |   30 ++++++++++++++++++++++++++++++
 libide/ide-diagnostic-provider.h |   18 ++++++++++++++++++
 2 files changed, 48 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-diagnostic-provider.c b/libide/ide-diagnostic-provider.c
index 391b71c..c49f4dd 100644
--- a/libide/ide-diagnostic-provider.c
+++ b/libide/ide-diagnostic-provider.c
@@ -17,6 +17,7 @@
  */
 
 #include "ide-diagnostic-provider.h"
+#include "ide-file.h"
 
 G_DEFINE_ABSTRACT_TYPE (IdeDiagnosticProvider,
                         ide_diagnostic_provider,
@@ -31,3 +32,32 @@ static void
 ide_diagnostic_provider_init (IdeDiagnosticProvider *self)
 {
 }
+
+void
+ide_diagnostic_provider_diagnose_async  (IdeDiagnosticProvider *self,
+                                         IdeFile               *file,
+                                         GCancellable          *cancellable,
+                                         GAsyncReadyCallback    callback,
+                                         gpointer               user_data)
+{
+  g_return_if_fail (IDE_IS_DIAGNOSTIC_PROVIDER (self));
+  g_return_if_fail (IDE_IS_FILE (file));
+  g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable));
+
+  if (IDE_DIAGNOSTIC_PROVIDER_GET_CLASS (self)->diagnose_async)
+    IDE_DIAGNOSTIC_PROVIDER_GET_CLASS (self)->diagnose_async (self, file, cancellable, callback, user_data);
+}
+
+IdeDiagnostics *
+ide_diagnostic_provider_diagnose_finish (IdeDiagnosticProvider  *self,
+                                         GAsyncResult           *result,
+                                         GError                **error)
+{
+  g_return_val_if_fail (IDE_IS_DIAGNOSTIC_PROVIDER (self), NULL);
+  g_return_val_if_fail (G_IS_ASYNC_RESULT (result), NULL);
+
+  if (IDE_DIAGNOSTIC_PROVIDER_GET_CLASS (self)->diagnose_finish)
+    return IDE_DIAGNOSTIC_PROVIDER_GET_CLASS (self)->diagnose_finish (self, result, error);
+
+  return NULL;
+}
diff --git a/libide/ide-diagnostic-provider.h b/libide/ide-diagnostic-provider.h
index 7f7bf3d..b7d3720 100644
--- a/libide/ide-diagnostic-provider.h
+++ b/libide/ide-diagnostic-provider.h
@@ -32,8 +32,26 @@ G_DECLARE_DERIVABLE_TYPE (IdeDiagnosticProvider, ide_diagnostic_provider,
 struct _IdeDiagnosticProviderClass
 {
   IdeObjectClass parent;
+
+  void            (*diagnose_async)  (IdeDiagnosticProvider  *self,
+                                      IdeFile                *file,
+                                      GCancellable           *cancellable,
+                                      GAsyncReadyCallback     callback,
+                                      gpointer                user_data);
+  IdeDiagnostics *(*diagnose_finish) (IdeDiagnosticProvider  *self,
+                                      GAsyncResult           *result,
+                                      GError                **error);
 };
 
+void            ide_diagnostic_provider_diagnose_async  (IdeDiagnosticProvider  *self,
+                                                         IdeFile                *file,
+                                                         GCancellable           *cancellable,
+                                                         GAsyncReadyCallback     callback,
+                                                         gpointer                user_data);
+IdeDiagnostics *ide_diagnostic_provider_diagnose_finish (IdeDiagnosticProvider  *self,
+                                                         GAsyncResult           *result,
+                                                         GError                **error);
+
 G_END_DECLS
 
 #endif /* IDE_DIAGNOSTIC_PROVIDER_H */


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