From 2b3aee08871cb1025b08b288437abf228928e380 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Mon, 7 Sep 2015 10:51:30 +0200 Subject: [PATCH] Another change of name and namespace consequently to libzakauthe. --- .gitignore | 4 +-- configure.ac | 10 +++---- data/Makefile.am | 2 +- .../Makefile.am | 0 .../form/Makefile.am | 0 .../form/user.form | 0 .../gui/Makefile.am | 0 .../gui/autedb.gui | 0 src/Makefile.am | 12 ++++----- src/aute_db.c | 26 +++++++++---------- src/aute_db.h | 8 +++--- src/user.c | 4 +-- src/user.h | 4 +-- tests/Makefile.am | 2 +- tests/test.c | 10 +++---- tools/Makefile.am | 4 +-- .../{zakauthdb_mkpwd.c => zakauthedb_mkpwd.c} | 8 +++--- 17 files changed, 47 insertions(+), 47 deletions(-) rename data/{libzakauthdb => libzakauthedb}/Makefile.am (100%) rename data/{libzakauthdb => libzakauthedb}/form/Makefile.am (100%) rename data/{libzakauthdb => libzakauthedb}/form/user.form (100%) rename data/{libzakauthdb => libzakauthedb}/gui/Makefile.am (100%) rename data/{libzakauthdb => libzakauthedb}/gui/autedb.gui (100%) rename tools/{zakauthdb_mkpwd.c => zakauthedb_mkpwd.c} (87%) diff --git a/.gitignore b/.gitignore index 00390e9..b8aeb3d 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,7 @@ missing config.h stamp-h1 tests/test -tools/zakauthdb-mkpwd +tools/zakauthedb-mkpwd *.tar.gz *.exe -compile \ No newline at end of file +compile diff --git a/configure.ac b/configure.ac index 1391083..e43a6b7 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([libzakauthdb], [0.5.0], [azagli@libero.it]) +AC_INIT([libzakauthedb], [0.5.0], [azagli@libero.it]) AC_CONFIG_SRCDIR([src/aute_db.c]) AC_CONFIG_HEADER([config.h]) @@ -21,7 +21,7 @@ AC_PROG_CC AC_PROG_LIBTOOL # Checks for libraries. -PKG_CHECK_MODULES(LIBAUTEDB, [libzakauth >= 0.5.0 +PKG_CHECK_MODULES(LIBAUTEDB, [libzakauthe >= 0.5.0 libgtkform >= 0.5.0]) AC_SUBST(LIBAUTEDB_CFLAGS) @@ -56,8 +56,8 @@ AC_CONFIG_FILES([ tests/Makefile tools/Makefile data/Makefile - data/libzakauthdb/Makefile - data/libzakauthdb/form/Makefile - data/libzakauthdb/gui/Makefile + data/libzakauthedb/Makefile + data/libzakauthedb/form/Makefile + data/libzakauthedb/gui/Makefile ]) AC_OUTPUT diff --git a/data/Makefile.am b/data/Makefile.am index fd72b0a..1df5cd8 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = libzakauthdb +SUBDIRS = libzakauthedb EXTRA_DIST = autedb_confi_schema.xml \ autedb.sql diff --git a/data/libzakauthdb/Makefile.am b/data/libzakauthedb/Makefile.am similarity index 100% rename from data/libzakauthdb/Makefile.am rename to data/libzakauthedb/Makefile.am diff --git a/data/libzakauthdb/form/Makefile.am b/data/libzakauthedb/form/Makefile.am similarity index 100% rename from data/libzakauthdb/form/Makefile.am rename to data/libzakauthedb/form/Makefile.am diff --git a/data/libzakauthdb/form/user.form b/data/libzakauthedb/form/user.form similarity index 100% rename from data/libzakauthdb/form/user.form rename to data/libzakauthedb/form/user.form diff --git a/data/libzakauthdb/gui/Makefile.am b/data/libzakauthedb/gui/Makefile.am similarity index 100% rename from data/libzakauthdb/gui/Makefile.am rename to data/libzakauthedb/gui/Makefile.am diff --git a/data/libzakauthdb/gui/autedb.gui b/data/libzakauthedb/gui/autedb.gui similarity index 100% rename from data/libzakauthdb/gui/autedb.gui rename to data/libzakauthedb/gui/autedb.gui diff --git a/src/Makefile.am b/src/Makefile.am index 909b4ee..47ecae4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,5 @@ -guidir = $(datadir)/libzakauthdb/gui -formdir = $(datadir)/libzakauthdb/form +guidir = $(datadir)/libzakauthedb/gui +formdir = $(datadir)/libzakauthedb/form AM_CPPFLAGS = $(LIBAUTEDB_CFLAGS) \ $(LIBGCRYPT_CFLAGS) \ @@ -13,12 +13,12 @@ LIBS = $(LIBAUTEDB_LIBS) \ $(GPG_ERROR_LIBS) \ $(LIBCONFI_LIBS) -libzakauth_pluginsdir = $(libdir)/libzakauth/plugins -libzakauth_plugins_LTLIBRARIES = libzakauthdb.la +libzakauthe_pluginsdir = $(libdir)/libzakauthe/plugins +libzakauthe_plugins_LTLIBRARIES = libzakauthedb.la -libzakauthdb_la_SOURCES = aute_db.c \ +libzakauthedb_la_SOURCES = aute_db.c \ aute_db.h \ user.c \ user.h -libzakauthdb_la_LDFLAGS = -no-undefined +libzakauthedb_la_LDFLAGS = -no-undefined diff --git a/src/aute_db.c b/src/aute_db.c index 138755e..e83eb56 100644 --- a/src/aute_db.c +++ b/src/aute_db.c @@ -66,7 +66,7 @@ get_connection_parameters_from_confi (Confi *confi, gchar **cnc_string) { gboolean ret = TRUE; - *cnc_string = confi_path_get_value (confi, "libzakauth/libzakauthdb/db/cnc_string"); + *cnc_string = confi_path_get_value (confi, "libzakauthe/libzakauthedb/db/cnc_string"); if (*cnc_string == NULL || strcmp (g_strstrip (*cnc_string), "") == 0) @@ -122,7 +122,7 @@ get_gdaex (GSList *parameters) gdaex = gdaex_new_from_string (cnc_string); if (gdaex == NULL) { - g_warning ("Unable to establish a db connection."); + g_warning ("Unable to establish a connection to the database."); } } @@ -149,13 +149,13 @@ static GtkWindow } /** - * zak_auth_db_encrypt_password: + * zak_authe_db_encrypt_password: * @password: una stringa da cifrare. * * Returns: the @password encrypted. */ gchar -*zak_auth_db_encrypt_password (const gchar *password) +*zak_authe_db_encrypt_password (const gchar *password) { gchar digest[17] = ""; gchar pwd_gcrypt[33] = ""; @@ -192,7 +192,7 @@ static gchar " AND password = '%s'" " AND status <> 'E'", gdaex_strescape (utente, NULL), - gdaex_strescape (zak_auth_db_encrypt_password (password), NULL)); + gdaex_strescape (zak_authe_db_encrypt_password (password), NULL)); dm = gdaex_query (gdaex, sql); g_free (sql); if (dm == NULL || gda_data_model_get_n_rows (dm) <= 0) @@ -227,7 +227,7 @@ static gchar sql = g_strdup_printf ("UPDATE users" " SET password = '%s'" " WHERE code = '%s'", - gdaex_strescape (zak_auth_db_encrypt_password (password_nuova), NULL), + gdaex_strescape (zak_authe_db_encrypt_password (password_nuova), NULL), gdaex_strescape (utente, NULL)); if (gdaex_execute (gdaex, sql) == -1) { @@ -308,7 +308,7 @@ autedb_edit_user () GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, - "You must before select a user."); + "You need to select a user."); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } @@ -353,7 +353,7 @@ autedb_on_btn_delete_clicked (GtkButton *button, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, - "Sicuro di voler eliminare l'utente selezionato?"); + "Are you sure to want to delete the selected user?"); risp = gtk_dialog_run (GTK_DIALOG (dialog)); if (risp == GTK_RESPONSE_YES) { @@ -374,7 +374,7 @@ autedb_on_btn_delete_clicked (GtkButton *button, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, - "Occorre prima selezionare un modello"); + "You need to select a user."); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } @@ -397,7 +397,7 @@ autedb_on_btn_find_clicked (GtkButton *button, /* PUBLIC */ gchar -*zak_auth_auth (GSList *parameters) +*zak_authe_authe (GSList *parameters) { GError *error; gchar *ret = NULL; @@ -496,7 +496,7 @@ gchar * */ GtkWidget -*zak_auth_plg_get_management_gui (GSList *parameters) +*zak_authe_plg_get_management_gui (GSList *parameters) { GError *error; @@ -509,14 +509,14 @@ GtkWidget gchar *GUIDIR; - GUIDIR = g_build_filename (g_win32_get_package_installation_directory_of_module (NULL), "share", "libzakauthdb", "gui", NULL); + GUIDIR = g_build_filename (g_win32_get_package_installation_directory_of_module (NULL), "share", "libzakauthedb", "gui", NULL); #endif if (!gtk_builder_add_objects_from_file (gtkbuilder, g_build_filename (GUIDIR, "autedb.gui", NULL), g_strsplit ("lstore_users|vbx_users_list", "|", -1), &error)) { - g_error ("Impossibile trovare il file di definizione dell'interfaccia utente."); + g_error ("Unable to find the gui definition file."); return NULL; } diff --git a/src/aute_db.h b/src/aute_db.h index d8be47b..50a2e70 100644 --- a/src/aute_db.h +++ b/src/aute_db.h @@ -17,15 +17,15 @@ * */ -#ifndef __ZAKAUTHDB_H__ -#define __ZAKAUTHDB_H__ +#ifndef __ZAKAUTHEDB_H__ +#define __ZAKAUTHEDB_H__ G_BEGIN_DECLS -gchar *zak_auth_db_encrypt_password (const gchar *password); +gchar *zak_authe_db_encrypt_password (const gchar *password); G_END_DECLS -#endif /* __ZAKAUTHDB_H__ */ +#endif /* __ZAKAUTHEDB_H__ */ diff --git a/src/user.c b/src/user.c index e1b96e9..d27aa6c 100644 --- a/src/user.c +++ b/src/user.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Andrea Zagli + * Copyright (C) 2010-2015 Andrea Zagli * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -230,7 +230,7 @@ user_salva (User *user) if (priv->code == NULL || g_strcmp0 (priv->code, "") == 0) { gtk_label_set_text (GTK_LABEL (priv->objects[LBL_PASSWORD]), - zak_auth_db_encrypt_password (gtk_entry_get_text (GTK_ENTRY (priv->objects[TXT_CODE])))); + zak_authe_db_encrypt_password (gtk_entry_get_text (GTK_ENTRY (priv->objects[TXT_CODE])))); sql = gtk_form_get_sql (priv->form, GTK_FORM_SQL_INSERT); } else diff --git a/src/user.h b/src/user.h index 39dfb05..dc4831b 100644 --- a/src/user.h +++ b/src/user.h @@ -1,5 +1,5 @@ -/* - * Copyright (C) 2010-2011 Andrea Zagli +/* + * Copyright (C) 2010-2015 Andrea Zagli * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/tests/Makefile.am b/tests/Makefile.am index 87249fb..0c43185 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -6,6 +6,6 @@ AM_CPPFLAGS = $(WARN_CFLAGS) \ LIBS = $(GTK_LIBS) \ $(LIBAUTEDB_LIBS) -LDADD = ../src/libzakauthdb.la +LDADD = ../src/libzakauthedb.la noinst_PROGRAMS = test diff --git a/tests/test.c b/tests/test.c index 1c48027..23f4bf0 100644 --- a/tests/test.c +++ b/tests/test.c @@ -18,26 +18,26 @@ #include -#include +#include int main (int argc, char **argv) { - ZakAuth *aute; + ZakAuthe *aute; GSList *params; gtk_init (&argc, &argv); - aute = zak_auth_new (); + aute = zak_authe_new (); /* the libaute module to use */ params = g_slist_append (params, argv[1]); /* the libgda connection string */ params = g_slist_append (params, argv[2]); - zak_auth_set_config (aute, params); + zak_authe_set_config (aute, params); - g_message ("User %s\n", zak_auth_auth (aute)); + g_message ("User %s\n", zak_authe_authe (aute)); return 0; } diff --git a/tools/Makefile.am b/tools/Makefile.am index e6ec6fc..2620808 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -6,6 +6,6 @@ AM_CPPFLAGS = $(WARN_CFLAGS) \ LIBS = $(LIBAUTEDB_LIBS) \ $(LIBGCRYPT_LIBS) -noinst_PROGRAMS = zakauthdb-mkpwd +noinst_PROGRAMS = zakauthedb-mkpwd -zakauthdb_mkpwd_SOURCES = zakauthdb_mkpwd.c +zakauthedb_mkpwd_SOURCES = zakauthedb_mkpwd.c diff --git a/tools/zakauthdb_mkpwd.c b/tools/zakauthedb_mkpwd.c similarity index 87% rename from tools/zakauthdb_mkpwd.c rename to tools/zakauthedb_mkpwd.c index 74f19e2..82ad2b2 100644 --- a/tools/zakauthdb_mkpwd.c +++ b/tools/zakauthedb_mkpwd.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 Andrea Zagli + * Copyright (C) 2006-2015 Andrea Zagli * * 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 @@ -52,7 +52,7 @@ main (int argc, char **argv) gchar *pwd = NULL; GOptionEntry entries[] = { - { "password", 'p', 0, G_OPTION_ARG_STRING, &pwd, "La stringa da cifrare", NULL }, + { "password", 'p', 0, G_OPTION_ARG_STRING, &pwd, "The string to encrypt", NULL }, { NULL } }; @@ -65,13 +65,13 @@ main (int argc, char **argv) if (!g_option_context_parse (context, &argc, &argv, &error)) { /* TO DO */ - g_printf ("Errore argomenti riga comando.\n"); + g_printf ("Error on command line arguments.\n"); return 0; } if (pwd == NULL || strcmp (g_strstrip (pwd), "") == 0) { - g_printf ("Occorre specificare la stringa da cifrare.\n"); + g_printf ("You need to provide the string to encrypt.\n"); return 0; } -- 2.49.0