[vala] libpq: Add PQping enum and functions



commit 7951541394b48dacfe59ff2d3f508a83b231026e
Author: Steven Oliver <oliver steven gmail com>
Date:   Tue Jan 28 19:52:04 2014 -0500

    libpq: Add PQping enum and functions
    
    Fixes bug 722878

 vapi/libpq.vapi |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/vapi/libpq.vapi b/vapi/libpq.vapi
index acdc6f5..10d6a18 100644
--- a/vapi/libpq.vapi
+++ b/vapi/libpq.vapi
@@ -17,7 +17,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
  *
  * Author:
- *     Jukka-Pekka Iivonen <jp0409 jippii fi>
+ *     Jukka-Pekka Iivonen <jp0409 jippii fi>
  */
 
 #if LIBPQ_9_3
@@ -93,6 +93,14 @@ namespace Postgres {
                SOURCE_FUNCTION
        }
 
+       [CCode (cname = "PGPing", cprefix = "PQPING_", has_type_id = false)]
+       public enum Ping {
+               OK,
+               REJECT,
+               NO_RESPONCE,
+               NO_ATTEMPT
+       }
+
        [Compact]
        [CCode (cname = "PGnotify", free_function = "PQfreemem")]
        public class Notify {
@@ -124,7 +132,7 @@ namespace Postgres {
        }
 
        [Compact]
-       [CCode (free_function = "PQconninfoFree", cname = "PQconninfoOption")]
+       [CCode (cname = "PQconninfoOption", free_function = "PQconninfoFree")]
        public class ConnectionOptions {
                public string keyword;
                public string envvar;
@@ -328,6 +336,12 @@ namespace Postgres {
                [CCode (cname = "PQisnonblocking")]
                public int is_non_blocking ();
 
+               [CCode (cname = "PQping"]
+               public Ping ping();
+                
+               [CCode (cname = "PQpingParams")]
+               public Ping ping_params(string keywords, string values, int expand_dbname);
+
                [CCode (cname = "PQflush")]
                public int flush ();
 


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