[libgit2-glib] Add GgitDirection and GgitCredType enums
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] Add GgitDirection and GgitCredType enums
- Date: Mon, 22 Dec 2014 19:27:43 +0000 (UTC)
commit df47b7aadd782e1de01def73095cc79ed61678e0
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Mon Dec 22 20:21:05 2014 +0100
Add GgitDirection and GgitCredType enums
libgit2-glib/ggit-remote-callbacks.h | 2 +-
libgit2-glib/ggit-remote.c | 6 +++---
libgit2-glib/ggit-remote.h | 2 +-
libgit2-glib/ggit-types.c | 9 +++++++++
libgit2-glib/ggit-types.h | 15 +++++++++++++++
5 files changed, 29 insertions(+), 5 deletions(-)
---
diff --git a/libgit2-glib/ggit-remote-callbacks.h b/libgit2-glib/ggit-remote-callbacks.h
index c8c42d4..a39c99a 100644
--- a/libgit2-glib/ggit-remote-callbacks.h
+++ b/libgit2-glib/ggit-remote-callbacks.h
@@ -63,7 +63,7 @@ struct _GgitRemoteCallbacksClass
gboolean (*credentials) (GgitRemoteCallbacks *callbacks,
const gchar *url,
const gchar *username_from_url,
- guint allowed_types,
+ GgitCredtype allowed_types,
GgitCred **cred,
GError **error);
diff --git a/libgit2-glib/ggit-remote.c b/libgit2-glib/ggit-remote.c
index 9855924..812196d 100644
--- a/libgit2-glib/ggit-remote.c
+++ b/libgit2-glib/ggit-remote.c
@@ -272,9 +272,9 @@ ggit_remote_get_url (GgitRemote *remote)
* starts up a specific binary which can only do the one or the other.
*/
void
-ggit_remote_connect (GgitRemote *remote,
- gboolean direction,
- GError **error)
+ggit_remote_connect (GgitRemote *remote,
+ GgitDirection direction,
+ GError **error)
{
gint ret;
diff --git a/libgit2-glib/ggit-remote.h b/libgit2-glib/ggit-remote.h
index 2b2f6f5..9e5c8b3 100644
--- a/libgit2-glib/ggit-remote.h
+++ b/libgit2-glib/ggit-remote.h
@@ -83,7 +83,7 @@ const gchar *ggit_remote_get_name (GgitRemote *remot
const gchar *ggit_remote_get_url (GgitRemote *remote);
void ggit_remote_connect (GgitRemote *remote,
- gboolean direction,
+ GgitDirection direction,
GError **error);
gboolean ggit_remote_get_connected (GgitRemote *remote);
diff --git a/libgit2-glib/ggit-types.c b/libgit2-glib/ggit-types.c
index d771cc1..b1c19da 100644
--- a/libgit2-glib/ggit-types.c
+++ b/libgit2-glib/ggit-types.c
@@ -265,4 +265,13 @@ ASSERT_ENUM (GGIT_DIFF_FIND_REMOVE_UNMODIFIED, GIT_DIFF_FIND_REMOVE_UNM
ASSERT_ENUM (GGIT_DIFF_FORMAT_EMAIL_NONE, GIT_DIFF_FORMAT_EMAIL_NONE);
ASSERT_ENUM (GGIT_DIFF_FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER,
GIT_DIFF_FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER);
+ASSERT_ENUM (GGIT_CREDTYPE_USERPASS_PLAINTEXT, GIT_CREDTYPE_USERPASS_PLAINTEXT);
+ASSERT_ENUM (GGIT_CREDTYPE_SSH_KEY, GIT_CREDTYPE_SSH_KEY);
+ASSERT_ENUM (GGIT_CREDTYPE_SSH_CUSTOM, GIT_CREDTYPE_SSH_CUSTOM);
+ASSERT_ENUM (GGIT_CREDTYPE_DEFAULT, GIT_CREDTYPE_DEFAULT);
+ASSERT_ENUM (GGIT_CREDTYPE_SSH_INTERACTIVE, GIT_CREDTYPE_SSH_INTERACTIVE);
+
+ASSERT_ENUM (GGIT_DIRECTION_FETCH, GIT_DIRECTION_FETCH);
+ASSERT_ENUM (GGIT_DIRECTION_PUSH, GIT_DIRECTION_PUSH);
+
/* ex:set ts=8 noet: */
diff --git a/libgit2-glib/ggit-types.h b/libgit2-glib/ggit-types.h
index 913b65e..595d975 100644
--- a/libgit2-glib/ggit-types.h
+++ b/libgit2-glib/ggit-types.h
@@ -1075,6 +1075,21 @@ typedef enum
GGIT_DIFF_FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER = (1 << 0)
} GgitDiffFormatEmailFlags;
+typedef enum
+{
+ GGIT_CREDTYPE_USERPASS_PLAINTEXT = (1u << 0),
+ GGIT_CREDTYPE_SSH_KEY = (1u << 1),
+ GGIT_CREDTYPE_SSH_CUSTOM = (1u << 2),
+ GGIT_CREDTYPE_DEFAULT = (1u << 3),
+ GGIT_CREDTYPE_SSH_INTERACTIVE = (1u << 4),
+} GgitCredtype;
+
+typedef enum
+{
+ GGIT_DIRECTION_FETCH = 0,
+ GGIT_DIRECTION_PUSH = 1
+} GgitDirection;
+
/**
* GgitConfigCallback:
* @entry: a #GgitConfigEntry.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]