[seahorse] common: Port SeahorseUsage and SeahorseFlags to vala
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] common: Port SeahorseUsage and SeahorseFlags to vala
- Date: Wed, 26 Jun 2013 10:19:09 +0000 (UTC)
commit b1a55303b98da00c31033a1209f678845167f8a1
Author: Stef Walter <stefw gnome org>
Date: Wed Jun 19 15:13:28 2013 +0200
common: Port SeahorseUsage and SeahorseFlags to vala
common/Makefile.am | 1 +
common/types.vala | 71 ++++++++++++++++++++++++++++++++++++++
libseahorse/Makefile.am | 1 -
libseahorse/seahorse-object.h | 2 +-
libseahorse/seahorse-predicate.h | 1 -
libseahorse/seahorse-types.c | 68 ------------------------------------
libseahorse/seahorse-types.h | 66 -----------------------------------
pkcs11/seahorse-certificate.c | 1 -
pkcs11/seahorse-private-key.c | 1 -
9 files changed, 73 insertions(+), 139 deletions(-)
---
diff --git a/common/Makefile.am b/common/Makefile.am
index f6709f2..71c0568 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -18,6 +18,7 @@ libcommon_la_SOURCES = \
lockable.vala \
place.vala \
registry.vala \
+ types.vala \
viewable.vala \
$(NULL)
diff --git a/common/types.vala b/common/types.vala
new file mode 100644
index 0000000..3c87abf
--- /dev/null
+++ b/common/types.vala
@@ -0,0 +1,71 @@
+/*
+ * Seahorse
+ *
+ * Copyright (C) 2008 Stefan Walter
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the
+ * Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+namespace Seahorse {
+
+/* Again, never change these values */
+public enum Usage {
+ NONE = 0,
+ SYMMETRIC_KEY = 1,
+ PUBLIC_KEY = 2,
+ PRIVATE_KEY = 3,
+ CREDENTIALS = 4,
+ IDENTITY = 5,
+ OTHER = 10
+}
+
+[Flags]
+public enum Flags {
+ [CCode (cname = "SEAHORSE_FLAG_NONE")]
+ NONE = 0,
+
+ [CCode (cname = "SEAHORSE_FLAG_IS_VALID")]
+ IS_VALID = 0x00000001,
+
+ [CCode (cname = "SEAHORSE_FLAG_CAN_ENCRYPT")]
+ CAN_ENCRYPT = 0x00000002,
+
+ [CCode (cname = "SEAHORSE_FLAG_CAN_SIGN")]
+ CAN_SIGN = 0x00000004,
+
+ [CCode (cname = "SEAHORSE_FLAG_EXPIRED")]
+ EXPIRED = 0x00000100,
+
+ [CCode (cname = "SEAHORSE_FLAG_REVOKED")]
+ REVOKED = 0x00000200,
+
+ [CCode (cname = "SEAHORSE_FLAG_DISABLED")]
+ DISABLED = 0x00000400,
+
+ [CCode (cname = "SEAHORSE_FLAG_TRUSTED")]
+ TRUSTED = 0x00001000,
+
+ [CCode (cname = "SEAHORSE_FLAG_PERSONAL")]
+ PERSONAL = 0x00002000,
+
+ [CCode (cname = "SEAHORSE_FLAG_EXPORTABLE")]
+ EXPORTABLE = 0x00100000,
+
+ [CCode (cname = "SEAHORSE_FLAG_DELETABLE")]
+ DELETABLE = 0x10000000
+}
+
+}
diff --git a/libseahorse/Makefile.am b/libseahorse/Makefile.am
index efa4e24..2bb8995 100644
--- a/libseahorse/Makefile.am
+++ b/libseahorse/Makefile.am
@@ -62,7 +62,6 @@ libseahorse_la_SOURCES = \
seahorse-progress.c seahorse-progress.h \
seahorse-search-provider.c seahorse-search-provider.h \
seahorse-servers.c seahorse-servers.h \
- seahorse-types.c seahorse-types.h \
seahorse-util.c seahorse-util.h \
seahorse-validity.c seahorse-validity.h \
seahorse-widget.c seahorse-widget.h \
diff --git a/libseahorse/seahorse-object.h b/libseahorse/seahorse-object.h
index 4b255db..4198e91 100644
--- a/libseahorse/seahorse-object.h
+++ b/libseahorse/seahorse-object.h
@@ -41,7 +41,7 @@
* flags: guint: Flags from the SEAHORSE_FLAG_ set.
*/
-#include "seahorse-types.h"
+#include "seahorse-common.h"
#include <glib-object.h>
diff --git a/libseahorse/seahorse-predicate.h b/libseahorse/seahorse-predicate.h
index 4d29be8..4e15891 100644
--- a/libseahorse/seahorse-predicate.h
+++ b/libseahorse/seahorse-predicate.h
@@ -24,7 +24,6 @@
#define __SEAHORSE_PREDICATE_H__
#include "seahorse-object.h"
-#include "seahorse-types.h"
#include <glib-object.h>
diff --git a/pkcs11/seahorse-certificate.c b/pkcs11/seahorse-certificate.c
index 42f775e..722d831 100644
--- a/pkcs11/seahorse-certificate.c
+++ b/pkcs11/seahorse-certificate.c
@@ -29,7 +29,6 @@
#include "seahorse-pkcs11-properties.h"
#include "seahorse-private-key.h"
#include "seahorse-token.h"
-#include "seahorse-types.h"
#include "seahorse-common.h"
#include "seahorse-util.h"
diff --git a/pkcs11/seahorse-private-key.c b/pkcs11/seahorse-private-key.c
index ff90a6b..7f1735b 100644
--- a/pkcs11/seahorse-private-key.c
+++ b/pkcs11/seahorse-private-key.c
@@ -28,7 +28,6 @@
#include "seahorse-pkcs11-key-deleter.h"
#include "seahorse-pkcs11-properties.h"
#include "seahorse-token.h"
-#include "seahorse-types.h"
#include "seahorse-common.h"
#include "seahorse-util.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]