major source structure and module name changes
This commit is contained in:
129
adlib/ad_gk/native/Makefile.am
Normal file
129
adlib/ad_gk/native/Makefile.am
Normal file
@@ -0,0 +1,129 @@
|
||||
#######################################################################
|
||||
#
|
||||
# Copyright (C) 2006 Novell, Inc.
|
||||
#
|
||||
# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
if DEBUG
|
||||
TARGET_CFG = Debug
|
||||
CFLAGS += -v -w
|
||||
else
|
||||
TARGET_CFG = Release
|
||||
endif
|
||||
|
||||
SUBDIRS =
|
||||
DIST_SUBDIRS =
|
||||
|
||||
EXTRA_DIST = $(CFILES) *.h
|
||||
|
||||
CASAROOT = ../../..
|
||||
|
||||
CASALIBDIR = $(CASAROOT)/$(LIB)
|
||||
|
||||
BUILD_VER = 1.1.1
|
||||
|
||||
# handle Mono secondary dependencies
|
||||
export MONO_PATH := $(MONO_PATH)
|
||||
|
||||
PLATFORMINDEPENDENTSOURCEDIR =
|
||||
PLATFORMDEPENDENTSOURCEDIR = .
|
||||
|
||||
MODULE_NAME = libad_gk
|
||||
MODULE_EXT = so
|
||||
|
||||
CFILES = $(srcdir)/ad_gk.c
|
||||
|
||||
LIBDIR = $(LIB)
|
||||
|
||||
CSFILES_CSC :=
|
||||
INCLUDES = -I. -I.. -I$(CASAROOT)/include \
|
||||
-I/opt/gnome/include/gnome-keyring-1 \
|
||||
-I/opt/gnome/include/glib-2.0 \
|
||||
-I/opt/gnome/$(LIBDIR)/glib-2.0/include \
|
||||
-L/opt/gnome/$(LIBDIR) -lglib-2.0
|
||||
|
||||
RESOURCES =
|
||||
EXTRA_CFLAGS =
|
||||
CFLAGS += $(INCLUDES) $(DEFINES)
|
||||
|
||||
LIBS = -lpthread -ldl
|
||||
LDFLAGS = -fno-exceptions -fno-check-new -Wl,-Bsymbolic -shared -pthread -O2 \
|
||||
-Wl,-rpath -Wl,/usr/$(LIBDIR) -Wl,-soname -Wl,libad_gk.so.1
|
||||
|
||||
EXTRA_LDFLAGS = -L/opt/gnome/$(LIBDIR) -lglib-2.0 -L/$(CASAROOT)/$(LIBDIR)
|
||||
|
||||
OBJDIR = ./$(TARGET_CFG)/$(LIBDIR)
|
||||
|
||||
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o))
|
||||
|
||||
EXTRA_DIST = $(CFILES) *.h
|
||||
|
||||
CUR_DIR := $(shell pwd)
|
||||
|
||||
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER)
|
||||
|
||||
#
|
||||
# Pattern based rules.
|
||||
#
|
||||
vpath %.c $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
|
||||
vpath %.cpp $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
$(CC) -c $(CFLAGS) $(EXTRA_CFLAGS) -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(OBJS)
|
||||
# @echo [======== Linking $@ ========]
|
||||
# $(LINK) -o $@ $(LDFLAGS) $(EXTRA_LDFLAGS) $(OBJS) $(LIBS)
|
||||
# cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
|
||||
|
||||
$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER): $(OBJDIR) $(OBJS)
|
||||
@echo [======== Linking $@ ========]
|
||||
c++ -o $@ $(LDFLAGS) $(EXTRA_LDFLAGS) $(OBJS) $(LIBS)
|
||||
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER)
|
||||
ln -sf $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT).1
|
||||
|
||||
$(OBJDIR):
|
||||
[ -d $(OBJDIR) ] || mkdir -p $(OBJDIR)
|
||||
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
|
||||
[ -d $(CASALIBDIR)/$(TARGET_CFG) ] || mkdir -p $(CASALIBDIR)/$(TARGET_CFG)
|
||||
|
||||
|
||||
install-exec-local: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
$(INSTALL_PROGRAM) $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(DESTDIR)$(libdir)/
|
||||
|
||||
uninstall-local:
|
||||
cd $(DESTDIR)$(libdir); rm -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
|
||||
rmdir $(DESTDIR)$(libdir)
|
||||
|
||||
#installcheck-local: install
|
||||
# $(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
|
||||
# cd $(DESTDIR)$(libdir); $(MONO)
|
||||
|
||||
clean-local:
|
||||
if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi
|
||||
|
||||
distclean-local:
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
||||
1029
adlib/ad_gk/native/ad_gk.c
Normal file
1029
adlib/ad_gk/native/ad_gk.c
Normal file
File diff suppressed because it is too large
Load Diff
133
adlib/ad_gk/native/ad_gk.h
Normal file
133
adlib/ad_gk/native/ad_gk.h
Normal file
@@ -0,0 +1,133 @@
|
||||
/***********************************************************************
|
||||
*
|
||||
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library 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
|
||||
* Library Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, Novell, Inc.
|
||||
*
|
||||
* To contact Novell about this file by physical or electronic mail,
|
||||
* you may find current contact information at www.novell.com.
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef _AD_GK_H_
|
||||
#define _AD_GK_H_
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <glib.h>
|
||||
#include <casa-gnome-keyring.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
|
||||
#define SUCCESS 0
|
||||
#define FAILURE -1
|
||||
|
||||
#define KEY_SIZE 128
|
||||
#define VAL_SIZE 128
|
||||
|
||||
enum KeyringResultExtended { GNOME_KEYRING_RESULT_NO_SUCH_ITEM = 128,
|
||||
GNOME_KEYRING_RESULT_CANNOT_DELETE_SECRET_VALUE,
|
||||
GNOME_KEYRING_RESULT_MALFORMED_XML,
|
||||
GNOME_KEYRING_RESULT_CANNOT_CREATE_KEYRING
|
||||
};
|
||||
|
||||
typedef struct _KeyringInfo
|
||||
{
|
||||
int32_t lockOnIdle;
|
||||
uint32_t lockTimeout;
|
||||
uint32_t mTime;
|
||||
uint32_t cTime;
|
||||
int32_t isLocked;
|
||||
}KeyringInfo;
|
||||
|
||||
typedef struct _ItemInfo
|
||||
{
|
||||
int32_t itemType;
|
||||
char *displayName;
|
||||
char *secret;
|
||||
uint32_t mTime;
|
||||
uint32_t cTime;
|
||||
}ItemInfo;
|
||||
|
||||
typedef struct _Attribute
|
||||
{
|
||||
uint32_t type;
|
||||
char *key;
|
||||
char *value;
|
||||
}Attribute;
|
||||
|
||||
|
||||
int GetKeyrings(GList **retList);
|
||||
int GetKeyringInfo(char *keyring,KeyringInfo *info);
|
||||
int GetItems(char *keyring, GList **itemList);
|
||||
int GetItemInfo(char *keyring, int itemId, ItemInfo *info);
|
||||
int GetAttributeList(char *keyring, int itemId, GList **);
|
||||
int FreeAttributeList(GList *attrList);
|
||||
int LoadGnomeKeyringLibrary();
|
||||
int ReleaseGnomeKeyringLibrary();
|
||||
|
||||
int
|
||||
UnlockRing(char *keyring, char *password);
|
||||
int
|
||||
SetItemAttributes (char *keyring, guint32 item_id, Attribute **attrs, int length);
|
||||
int
|
||||
CreateItem(char *keyring, int32_t itemType, char *display_name, char *secret, Attribute **attrs, int attrcnt);
|
||||
int
|
||||
RemoveItem (char *keyring, guint32 itemid);
|
||||
int
|
||||
SetPassword (char *keyring, guint32 itemid, char *secret);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct _GetKeyringsCbData
|
||||
{
|
||||
GList **keyringList;
|
||||
GMainLoop *loop;
|
||||
}GetKeyringsCbData;
|
||||
|
||||
typedef struct _GetKeyringInfoCbData
|
||||
{
|
||||
KeyringInfo *info;
|
||||
GMainLoop *loop;
|
||||
}GetKeyringInfoCbData;
|
||||
|
||||
typedef struct _GetItemsCbData
|
||||
{
|
||||
GList **itemList;
|
||||
GMainLoop *loop;
|
||||
}GetItemsCbData;
|
||||
|
||||
typedef struct _GetItemInfoCbData
|
||||
{
|
||||
ItemInfo *info;
|
||||
GMainLoop *loop;
|
||||
}GetItemInfoCbData;
|
||||
|
||||
typedef struct _GetAttributeListCbData
|
||||
{
|
||||
GList **attrList;
|
||||
GMainLoop *loop;
|
||||
}GetAttributeListCbData;
|
||||
typedef struct _OperationCompleted
|
||||
{
|
||||
char *OperationName;
|
||||
GnomeKeyringResult result;
|
||||
|
||||
}OperationCompleted;
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
729
adlib/ad_gk/native/casa-gnome-keyring.h
Normal file
729
adlib/ad_gk/native/casa-gnome-keyring.h
Normal file
@@ -0,0 +1,729 @@
|
||||
/***********************************************************************
|
||||
*
|
||||
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library 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
|
||||
* Library Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, Novell, Inc.
|
||||
*
|
||||
* To contact Novell about this file by physical or electronic mail,
|
||||
* you may find current contact information at www.novell.com.
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef _CASA_GNOME_KEYRING_H
|
||||
#define _CASA_GNOME_KEYRING_H
|
||||
|
||||
#include <glib.h>
|
||||
#include <time.h>
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CASA_GNOME_KEYRING_RESULT_OK,
|
||||
CASA_GNOME_KEYRING_RESULT_DENIED,
|
||||
CASA_GNOME_KEYRING_RESULT_NO_KEYRING_DAEMON,
|
||||
CASA_GNOME_KEYRING_RESULT_ALREADY_UNLOCKED,
|
||||
CASA_GNOME_KEYRING_RESULT_NO_SUCH_KEYRING,
|
||||
CASA_GNOME_KEYRING_RESULT_BAD_ARGUMENTS,
|
||||
CASA_GNOME_KEYRING_RESULT_IO_ERROR,
|
||||
CASA_GNOME_KEYRING_RESULT_CANCELLED,
|
||||
CASA_GNOME_KEYRING_RESULT_ALREADY_EXISTS
|
||||
} CASA_GnomeKeyringResult_T;
|
||||
|
||||
#define GNOME_KEYRING_RESULT_OK CASA_GNOME_KEYRING_RESULT_OK
|
||||
#define GNOME_KEYRING_RESULT_DENIED CASA_GNOME_KEYRING_RESULT_DENIED
|
||||
#define GNOME_KEYRING_RESULT_NO_KEYRING_DAEMON CASA_GNOME_KEYRING_RESULT_NO_KEYRING_DAEMON
|
||||
#define GNOME_KEYRING_RESULT_ALREADY_UNLOCKED CASA_GNOME_KEYRING_RESULT_ALREADY_UNLOCKED
|
||||
#define GNOME_KEYRING_RESULT_NO_SUCH_KEYRING CASA_GNOME_KEYRING_RESULT_NO_SUCH_KEYRING
|
||||
#define GNOME_KEYRING_RESULT_BAD_ARGUMENTS CASA_GNOME_KEYRING_RESULT_BAD_ARGUMENTS
|
||||
#define GNOME_KEYRING_RESULT_IO_ERROR CASA_GNOME_KEYRING_RESULT_IO_ERROR
|
||||
#define GNOME_KEYRING_RESULT_CANCELLED CASA_GNOME_KEYRING_RESULT_CANCELLED
|
||||
#define GNOME_KEYRING_RESULT_ALREADY_EXISTS CASA_GNOME_KEYRING_RESULT_ALREADY_EXISTS
|
||||
|
||||
#define GnomeKeyringResult CASA_GnomeKeyringResult_T
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CASA_GNOME_KEYRING_ITEM_GENERIC_SECRET,
|
||||
CASA_GNOME_KEYRING_ITEM_NETWORK_PASSWORD,
|
||||
CASA_GNOME_KEYRING_ITEM_NOTE,
|
||||
CASA_GNOME_KEYRING_ITEM_LAST_TYPE,
|
||||
CASA_GNOME_KEYRING_ITEM_NO_TYPE = 0xffffffff,
|
||||
} CASA_GnomeKeyringItemType_T;
|
||||
|
||||
#define GNOME_KEYRING_ITEM_GENERIC_SECRET CASA_GNOME_KEYRING_ITEM_GENERIC_SECRET
|
||||
#define GNOME_KEYRING_ITEM_NETWORK_PASSWORD CASA_GNOME_KEYRING_ITEM_NETWORK_PASSWORD
|
||||
#define GNOME_KEYRING_ITEM_NOTE CASA_GNOME_KEYRING_ITEM_NOTE
|
||||
#define GNOME_KEYRING_ITEM_LAST_TYPE CASA_GNOME_KEYRING_ITEM_LAST_TYPE
|
||||
#define GNOME_KEYRING_ITEM_NO_TYPE CASA_GNOME_KEYRING_ITEM_NO_TYPE
|
||||
|
||||
#define GnomeKeyringItemType CASA_GnomeKeyringItemType_T
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CASA_GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
|
||||
CASA_GNOME_KEYRING_ATTRIBUTE_TYPE_UINT32
|
||||
} CASA_GnomeKeyringAttributeType_T;
|
||||
|
||||
#define GNOME_KEYRING_ATTRIBUTE_TYPE_STRING CASA_GNOME_KEYRING_ATTRIBUTE_TYPE_STRING
|
||||
#define GNOME_KEYRING_ATTRIBUTE_TYPE_UINT32 CASA_GNOME_KEYRING_ATTRIBUTE_TYPE_UINT32
|
||||
|
||||
#define GnomeKeyringAttributeType CASA_GnomeKeyringAttributeType_T
|
||||
|
||||
typedef struct GnomeKeyringAccessControl CASA_GnomeKeyringAccessControl_T;
|
||||
typedef struct GnomeKeyringApplicationRef CASA_GnomeKeyringApplicationRef_T;
|
||||
typedef GArray CASA_GnomeKeyringAttributeList_T;
|
||||
|
||||
#define GnomeKeyringAccessControl CASA_GnomeKeyringAccessControl_T
|
||||
#define GnomeKeyringApplicationRef CASA_GnomeKeyringApplicationRef_T
|
||||
#define GnomeKeyringAttributeList CASA_GnomeKeyringAttributeList_T
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CASA_GNOME_KEYRING_ACCESS_READ = 1<<0,
|
||||
CASA_GNOME_KEYRING_ACCESS_WRITE = 1<<1,
|
||||
CASA_GNOME_KEYRING_ACCESS_REMOVE = 1<<2
|
||||
} CASA_GnomeKeyringAccessType_T;
|
||||
|
||||
#define GNOME_KEYRING_ACCESS_READ CASA_GNOME_KEYRING_ACCESS_READ
|
||||
#define GNOME_KEYRING_ACCESS_WRITE CASA_GNOME_KEYRING_ACCESS_WRITE
|
||||
#define GNOME_KEYRING_ACCESS_REMOVE CASA_GNOME_KEYRING_ACCESS_REMOVE
|
||||
|
||||
#define GnomeKeyringAccessType CASA_GnomeKeyringAccessType_T
|
||||
|
||||
|
||||
typedef struct GnomeKeyringInfo CASA_GnomeKeyringInfo_T;
|
||||
typedef struct GnomeKeyringItemInfo CASA_GnomeKeyringItemInfo_T;
|
||||
|
||||
#define GnomeKeyringInfo CASA_GnomeKeyringInfo_T
|
||||
#define GnomeKeyringItemInfo CASA_GnomeKeyringItemInfo_T
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *name;
|
||||
CASA_GnomeKeyringAttributeType_T type;
|
||||
union
|
||||
{
|
||||
char *string;
|
||||
guint32 integer;
|
||||
} value;
|
||||
} CASA_GnomeKeyringAttribute_T;
|
||||
|
||||
#define GnomeKeyringAttribute CASA_GnomeKeyringAttribute_T
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *keyring;
|
||||
guint item_id;
|
||||
CASA_GnomeKeyringAttributeList_T *attributes;
|
||||
char *secret;
|
||||
} CASA_GnomeKeyringFound_T;
|
||||
|
||||
#define GnomeKeyringFound CASA_GnomeKeyringFound_T
|
||||
|
||||
typedef void (*CASA_GnomeKeyringOperationDoneCallback_T)
|
||||
(
|
||||
CASA_GnomeKeyringResult_T result,
|
||||
gpointer data
|
||||
);
|
||||
|
||||
#define GnomeKeyringOperationDoneCallback CASA_GnomeKeyringOperationDoneCallback_T
|
||||
|
||||
typedef void (*CASA_GnomeKeyringOperationGetStringCallback_T)
|
||||
(
|
||||
CASA_GnomeKeyringResult_T result,
|
||||
const char *string,
|
||||
gpointer data
|
||||
);
|
||||
|
||||
#define GnomeKeyringOperationGetStringCallback CASA_GnomeKeyringOperationGetStringCallback_T
|
||||
|
||||
typedef void (*CASA_GnomeKeyringOperationGetIntCallback_T)
|
||||
(
|
||||
CASA_GnomeKeyringResult_T result,
|
||||
guint32 val,
|
||||
gpointer data
|
||||
);
|
||||
|
||||
#define GnomeKeyringOperationGetIntCallback CASA_GnomeKeyringOperationGetIntCallback_T
|
||||
|
||||
typedef void (*CASA_GnomeKeyringOperationGetListCallback_T)
|
||||
(
|
||||
CASA_GnomeKeyringResult_T result,
|
||||
GList *list,
|
||||
gpointer data
|
||||
);
|
||||
|
||||
#define GnomeKeyringOperationGetListCallback CASA_GnomeKeyringOperationGetListCallback_T
|
||||
|
||||
typedef void (*CASA_GnomeKeyringOperationGetKeyringInfoCallback_T)
|
||||
(
|
||||
CASA_GnomeKeyringResult_T result,
|
||||
CASA_GnomeKeyringInfo_T *info,
|
||||
gpointer data
|
||||
);
|
||||
|
||||
#define GnomeKeyringOperationGetKeyringInfoCallback CASA_GnomeKeyringOperationGetKeyringInfoCallback_T
|
||||
|
||||
typedef void (*CASA_GnomeKeyringOperationGetItemInfoCallback_T)
|
||||
(
|
||||
CASA_GnomeKeyringResult_T result,
|
||||
CASA_GnomeKeyringItemInfo_T*info,
|
||||
gpointer data
|
||||
);
|
||||
|
||||
#define GnomeKeyringOperationGetItemInfoCallback CASA_GnomeKeyringOperationGetItemInfoCallback_T
|
||||
|
||||
typedef void (*CASA_GnomeKeyringOperationGetAttributesCallback_T)
|
||||
(
|
||||
CASA_GnomeKeyringResult_T result,
|
||||
CASA_GnomeKeyringAttributeList_T *attributes,
|
||||
gpointer data
|
||||
);
|
||||
|
||||
#define GnomeKeyringOperationGetAttributesCallback CASA_GnomeKeyringOperationGetAttributesCallback_T
|
||||
|
||||
#define CASA_gnome_keyring_attribute_list_index(a, i) g_array_index ((a), GnomeKeyringAttribute, (i))
|
||||
#define gnome_keyring_attribute_list_index CASA_gnome_keyring_attribute_list_index
|
||||
|
||||
#define CASA_gnome_keyring_attribute_list_new() (g_array_new (FALSE, FALSE, sizeof (GnomeKeyringAttribute)))
|
||||
#define gnome_keyring_attribute_list_new CASA_gnome_keyring_attribute_list_new
|
||||
|
||||
void CASA_gnome_keyring_attribute_list_append_string
|
||||
(
|
||||
CASA_GnomeKeyringAttributeList_T *attributes,
|
||||
const char *attribute,
|
||||
const char *value
|
||||
);
|
||||
|
||||
#define gnome_keyring_attribute_list_append_string CASA_gnome_keyring_attribute_list_append_string
|
||||
|
||||
void CASA_gnome_keyring_attribute_list_append_uint32
|
||||
(
|
||||
CASA_GnomeKeyringAttributeList_T *attributes,
|
||||
const char *attribute,
|
||||
guint32 value
|
||||
);
|
||||
|
||||
#define gnome_keyring_attribute_list_append_uint32 CASA_gnome_keyring_attribute_list_append_uint32
|
||||
|
||||
GnomeKeyringAttributeList *CASA_gnome_keyring_attribute_list_copy
|
||||
(
|
||||
CASA_GnomeKeyringAttributeList_T *attributes
|
||||
);
|
||||
|
||||
#define gnome_keyring_attribute_list_copy CASA_gnome_keyring_attribute_list_copy
|
||||
|
||||
gboolean CASA_gnome_keyring_is_available (void);
|
||||
|
||||
#define gnome_keyring_is_available CASA_gnome_keyring_is_available
|
||||
|
||||
void CASA_gnome_keyring_free_password (char *password);
|
||||
|
||||
#define gnome_keyring_free_password CASA_gnome_keyring_free_password
|
||||
|
||||
void CASA_gnome_keyring_found_free (CASA_GnomeKeyringFound_T *found);
|
||||
|
||||
#define gnome_keyring_found_free CASA_gnome_keyring_found_free
|
||||
|
||||
void CASA_gnome_keyring_found_list_free (GList *found_list);
|
||||
|
||||
#define gnome_keyring_found_list_free CASA_gnome_keyring_found_list_free
|
||||
|
||||
void CASA_gnome_keyring_cancel_request (gpointer request);
|
||||
|
||||
#define gnome_keyring_cancel_request CASA_gnome_keyring_cancel_request
|
||||
|
||||
gpointer CASA_gnome_keyring_set_default_keyring
|
||||
(
|
||||
const char *keyring,
|
||||
CASA_GnomeKeyringOperationDoneCallback_T callback,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_data
|
||||
);
|
||||
|
||||
#define gnome_keyring_set_default_keyring CASA_gnome_keyring_set_default_keyring
|
||||
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_set_default_keyring_sync
|
||||
(
|
||||
const char *keyring
|
||||
);
|
||||
|
||||
#define gnome_keyring_set_default_keyring_sync CASA_gnome_keyring_set_default_keyring_sync
|
||||
|
||||
|
||||
gpointer CASA_gnome_keyring_get_default_keyring
|
||||
(
|
||||
CASA_GnomeKeyringOperationGetStringCallback_T callback,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_data
|
||||
);
|
||||
|
||||
#define gnome_keyring_get_default_keyring CASA_gnome_keyring_get_default_keyring
|
||||
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_get_default_keyring_sync
|
||||
(
|
||||
char **keyring
|
||||
);
|
||||
|
||||
#define gnome_keyring_get_default_keyring_sync CASA_gnome_keyring_get_default_keyring_sync
|
||||
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_list_keyring_names_sync
|
||||
(
|
||||
GList **keyrings
|
||||
);
|
||||
|
||||
#define gnome_keyring_list_keyring_names_sync CASA_gnome_keyring_list_keyring_names_sync
|
||||
|
||||
gpointer CASA_gnome_keyring_lock_all
|
||||
(
|
||||
CASA_GnomeKeyringOperationDoneCallback_T callback,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_data
|
||||
);
|
||||
|
||||
#define gnome_keyring_lock_all CASA_gnome_keyring_lock_all
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_lock_all_sync(void);
|
||||
|
||||
#define gnome_keyring_lock_all_sync CASA_gnome_keyring_lock_all_sync
|
||||
|
||||
/* NULL password means ask user */
|
||||
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_create_sync
|
||||
(
|
||||
const char *keyring_name,
|
||||
const char *password
|
||||
);
|
||||
|
||||
#define gnome_keyring_create_sync CASA_gnome_keyring_create_sync
|
||||
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_unlock_sync
|
||||
(
|
||||
const char *keyring,
|
||||
const char *password
|
||||
);
|
||||
|
||||
#define gnome_keyring_unlock_sync CASA_gnome_keyring_unlock_sync
|
||||
|
||||
gpointer CASA_gnome_keyring_lock
|
||||
(
|
||||
const char *keyring,
|
||||
CASA_GnomeKeyringOperationDoneCallback_T callback,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_data
|
||||
);
|
||||
|
||||
#define gnome_keyring_lock CASA_gnome_keyring_lock
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_lock_sync
|
||||
(
|
||||
const char *keyring
|
||||
);
|
||||
|
||||
#define gnome_keyring_lock_sync CASA_gnome_keyring_lock_sync
|
||||
|
||||
gpointer CASA_gnome_keyring_delete
|
||||
(
|
||||
const char *keyring,
|
||||
CASA_GnomeKeyringOperationDoneCallback_T callback,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_data
|
||||
);
|
||||
|
||||
#define gnome_keyring_delete CASA_gnome_keyring_delete
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_delete_sync
|
||||
(
|
||||
const char *keyring
|
||||
);
|
||||
|
||||
#define gnome_keyring_delete_sync CASA_gnome_keyring_delete_sync
|
||||
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_get_info_sync
|
||||
(
|
||||
const char *keyring,
|
||||
CASA_GnomeKeyringInfo_T **info
|
||||
);
|
||||
|
||||
#define gnome_keyring_get_info_sync CASA_gnome_keyring_get_info_sync
|
||||
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_set_info_sync
|
||||
(
|
||||
const char *keyring,
|
||||
GnomeKeyringInfo *info
|
||||
|
||||
);
|
||||
|
||||
#define gnome_keyring_set_info_sync CASA_gnome_keyring_set_info_sync
|
||||
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_list_item_ids_sync
|
||||
(
|
||||
const char *keyring,
|
||||
GList **ids
|
||||
);
|
||||
|
||||
#define gnome_keyring_list_item_ids_sync CASA_gnome_keyring_list_item_ids_sync
|
||||
|
||||
void CASA_gnome_keyring_info_free
|
||||
(
|
||||
CASA_GnomeKeyringInfo_T *keyring_info
|
||||
);
|
||||
|
||||
#define gnome_keyring_info_free CASA_gnome_keyring_info_free
|
||||
|
||||
CASA_GnomeKeyringInfo_T *CASA_gnome_keyring_info_copy
|
||||
(
|
||||
CASA_GnomeKeyringInfo_T *keyring_info
|
||||
);
|
||||
|
||||
|
||||
#define gnome_keyring_info_copy CASA_gnome_keyring_info_copy
|
||||
|
||||
void CASA_gnome_keyring_info_set_lock_on_idle
|
||||
(
|
||||
GnomeKeyringInfo *keyring_info,
|
||||
gboolean value
|
||||
);
|
||||
|
||||
|
||||
gpointer CASA_gnome_keyring_find_items
|
||||
(
|
||||
CASA_GnomeKeyringItemType_T type,
|
||||
CASA_GnomeKeyringAttributeList_T *attributes,
|
||||
CASA_GnomeKeyringOperationGetListCallback_T callback,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_data
|
||||
);
|
||||
|
||||
#define gnome_keyring_find_items CASA_gnome_keyring_find_items
|
||||
|
||||
gpointer CASA_gnome_keyring_find_itemsv
|
||||
(
|
||||
CASA_GnomeKeyringItemType_T type,
|
||||
CASA_GnomeKeyringOperationGetListCallback_T callback,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_data,
|
||||
...
|
||||
);
|
||||
|
||||
#define gnome_keyring_find_itemsv CASA_gnome_keyring_find_itemsv
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_find_items_sync
|
||||
(
|
||||
CASA_GnomeKeyringItemType_T type,
|
||||
CASA_GnomeKeyringAttributeList_T *attributes,
|
||||
GList **found
|
||||
);
|
||||
|
||||
#define gnome_keyring_find_items_sync CASA_gnome_keyring_find_items_sync
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_find_itemsv_sync
|
||||
(
|
||||
CASA_GnomeKeyringItemType_T type,
|
||||
GList **found,
|
||||
...
|
||||
);
|
||||
|
||||
#define gnome_keyring_find_itemsv_sync CASA_gnome_keyring_find_itemsv_sync
|
||||
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_item_create_sync
|
||||
(
|
||||
const char *keyring,
|
||||
CASA_GnomeKeyringItemType_T type,
|
||||
const char *display_name,
|
||||
CASA_GnomeKeyringAttributeList_T *attributes,
|
||||
const char *secret,
|
||||
gboolean update_if_exists,
|
||||
guint32 *item_id
|
||||
);
|
||||
|
||||
#define gnome_keyring_item_create_sync CASA_gnome_keyring_item_create_sync
|
||||
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_item_delete_sync
|
||||
(
|
||||
const char *keyring,
|
||||
guint32 id
|
||||
);
|
||||
|
||||
#define gnome_keyring_item_delete_sync CASA_gnome_keyring_item_delete_sync
|
||||
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_item_get_info_sync
|
||||
(
|
||||
const char *keyring,
|
||||
guint32 id,
|
||||
CASA_GnomeKeyringItemInfo_T **info
|
||||
);
|
||||
|
||||
#define gnome_keyring_item_get_info_sync CASA_gnome_keyring_item_get_info_sync
|
||||
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_item_set_info_sync
|
||||
(
|
||||
const char *keyring,
|
||||
guint32 id,
|
||||
CASA_GnomeKeyringItemInfo_T *info
|
||||
);
|
||||
|
||||
#define gnome_keyring_item_set_info_sync CASA_gnome_keyring_item_set_info_sync
|
||||
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_item_get_attributes_sync
|
||||
(
|
||||
const char *keyring,
|
||||
guint32 id,
|
||||
CASA_GnomeKeyringAttributeList_T **attributes
|
||||
);
|
||||
|
||||
#define gnome_keyring_item_get_attributes_sync CASA_gnome_keyring_item_get_attributes_sync
|
||||
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_item_set_attributes_sync
|
||||
(
|
||||
const char *keyring,
|
||||
guint32 id,
|
||||
CASA_GnomeKeyringAttributeList_T *attributes
|
||||
);
|
||||
|
||||
#define gnome_keyring_item_set_attributes_sync CASA_gnome_keyring_item_set_attributes_sync
|
||||
|
||||
gpointer CASA_gnome_keyring_item_get_acl
|
||||
(
|
||||
const char *keyring,
|
||||
guint32 id,
|
||||
CASA_GnomeKeyringOperationGetListCallback_T callback,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_data
|
||||
);
|
||||
|
||||
#define gnome_keyring_item_get_acl CASA_gnome_keyring_item_get_acl
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_item_get_acl_sync
|
||||
(
|
||||
const char *keyring,
|
||||
guint32 id,
|
||||
GList **acl
|
||||
);
|
||||
|
||||
#define gnome_keyring_item_get_acl_sync CASA_gnome_keyring_item_get_acl_sync
|
||||
|
||||
gpointer CASA_gnome_keyring_item_set_acl
|
||||
(
|
||||
const char *keyring,
|
||||
guint32 id,
|
||||
GList *acl,
|
||||
CASA_GnomeKeyringOperationDoneCallback_T callback,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_data
|
||||
);
|
||||
|
||||
#define gnome_keyring_item_set_acl CASA_gnome_keyring_item_set_acl
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_item_set_acl_sync
|
||||
(
|
||||
const char *keyring,
|
||||
guint32 id,
|
||||
GList *acl
|
||||
);
|
||||
|
||||
#define gnome_keyring_item_set_acl_sync CASA_gnome_keyring_item_set_acl_sync
|
||||
|
||||
|
||||
CASA_GnomeKeyringItemInfo_T *CASA_gnome_keyring_item_info_copy (CASA_GnomeKeyringItemInfo_T *item_info);
|
||||
#define gnome_keyring_item_info_copy CASA_gnome_keyring_item_info_copy
|
||||
|
||||
void CASA_gnome_keyring_item_info_set_type
|
||||
(
|
||||
CASA_GnomeKeyringItemInfo_T *item_info,
|
||||
CASA_GnomeKeyringItemType_T type
|
||||
);
|
||||
|
||||
#define gnome_keyring_item_info_set_type CASA_gnome_keyring_item_info_set_type
|
||||
|
||||
|
||||
void CASA_gnome_keyring_item_info_set_display_name
|
||||
(
|
||||
CASA_GnomeKeyringItemInfo_T *item_info,
|
||||
const char *value
|
||||
);
|
||||
|
||||
#define gnome_keyring_item_info_set_display_name CASA_gnome_keyring_item_info_set_display_name
|
||||
|
||||
|
||||
CASA_GnomeKeyringApplicationRef_T *CASA_gnome_keyring_application_ref_new (void);
|
||||
#define gnome_keyring_application_ref_new CASA_gnome_keyring_application_ref_new
|
||||
|
||||
CASA_GnomeKeyringApplicationRef_T *CASA_gnome_keyring_application_ref_copy (const CASA_GnomeKeyringApplicationRef_T *app);
|
||||
#define gnome_keyring_application_ref_copy CASA_gnome_keyring_application_ref_copy
|
||||
|
||||
void CASA_gnome_keyring_application_ref_free (CASA_GnomeKeyringApplicationRef_T *app);
|
||||
#define gnome_keyring_application_ref_free CASA_gnome_keyring_application_ref_free
|
||||
|
||||
CASA_GnomeKeyringAccessControl_T *CASA_gnome_keyring_access_control_new
|
||||
(
|
||||
const CASA_GnomeKeyringApplicationRef_T *application,
|
||||
CASA_GnomeKeyringAccessType_T types_allowed
|
||||
);
|
||||
#define gnome_keyring_access_control_new CASA_gnome_keyring_access_control_new
|
||||
|
||||
|
||||
CASA_GnomeKeyringAccessControl_T *CASA_gnome_keyring_access_control_copy (GnomeKeyringAccessControl *ac);
|
||||
#define gnome_keyring_access_control_copy CASA_gnome_keyring_access_control_copy
|
||||
|
||||
|
||||
|
||||
void CASA_gnome_keyring_access_control_free (CASA_GnomeKeyringAccessControl_T *ac);
|
||||
#define gnome_keyring_access_control_free CASA_gnome_keyring_access_control_free
|
||||
|
||||
GList * CASA_gnome_keyring_acl_copy (GList *list);
|
||||
#define gnome_keyring_acl_copy CASA_gnome_keyring_acl_copy
|
||||
|
||||
void CASA_gnome_keyring_acl_free (GList *acl);
|
||||
#define gnome_keyring_acl_free CASA_gnome_keyring_acl_free
|
||||
|
||||
|
||||
char *CASA_gnome_keyring_item_ac_get_display_name (CASA_GnomeKeyringAccessControl_T *ac);
|
||||
#define gnome_keyring_item_ac_get_display_name CASA_gnome_keyring_item_ac_get_display_name
|
||||
|
||||
void CASA_gnome_keyring_item_ac_set_display_name
|
||||
(
|
||||
CASA_GnomeKeyringAccessControl_T *ac,
|
||||
const char *value
|
||||
);
|
||||
#define gnome_keyring_item_ac_set_display_name CASA_gnome_keyring_item_ac_set_display_name
|
||||
|
||||
char *CASA_gnome_keyring_item_ac_get_path_name (CASA_GnomeKeyringAccessControl_T *ac);
|
||||
#define gnome_keyring_item_ac_get_path_name CASA_gnome_keyring_item_ac_get_path_name
|
||||
|
||||
void CASA_gnome_keyring_item_ac_set_path_name
|
||||
(
|
||||
CASA_GnomeKeyringAccessControl_T *ac,
|
||||
const char *value
|
||||
);
|
||||
|
||||
#define gnome_keyring_item_ac_set_path_name CASA_gnome_keyring_item_ac_set_path_name
|
||||
|
||||
|
||||
CASA_GnomeKeyringAccessType_T CASA_gnome_keyring_item_ac_get_access_type (CASA_GnomeKeyringAccessControl_T *ac);
|
||||
#define gnome_keyring_item_ac_get_access_type CASA_gnome_keyring_item_ac_get_access_type
|
||||
|
||||
void CASA_gnome_keyring_item_ac_set_access_type
|
||||
(
|
||||
CASA_GnomeKeyringAccessControl_T *ac,
|
||||
const CASA_GnomeKeyringAccessType_T value
|
||||
);
|
||||
|
||||
#define gnome_keyring_item_ac_set_access_type CASA_gnome_keyring_item_ac_set_access_type
|
||||
|
||||
/* Specialized Helpers for network passwords items */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *keyring;
|
||||
guint32 item_id;
|
||||
char *protocol;
|
||||
char *server;
|
||||
char *object;
|
||||
char *authtype;
|
||||
guint32 port;
|
||||
char *user;
|
||||
char *domain;
|
||||
char *password;
|
||||
} CASA_GnomeKeyringNetworkPasswordData_T;
|
||||
|
||||
#define GnomeKeyringNetworkPasswordData CASA_GnomeKeyringNetworkPasswordData_T
|
||||
|
||||
void CASA_gnome_keyring_network_password_free (CASA_GnomeKeyringNetworkPasswordData_T *data);
|
||||
#define gnome_keyring_network_password_free CASA_gnome_keyring_network_password_free
|
||||
|
||||
void CASA_gnome_keyring_network_password_list_free (GList *list);
|
||||
#define gnome_keyring_network_password_list_free CASA_gnome_keyring_network_password_list_free
|
||||
|
||||
gpointer CASA_gnome_keyring_find_network_password
|
||||
(
|
||||
const char *user,
|
||||
const char *domain,
|
||||
const char *server,
|
||||
const char *object,
|
||||
const char *protocol,
|
||||
const char *authtype,
|
||||
guint32 port,
|
||||
CASA_GnomeKeyringOperationGetListCallback_T callback,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_data
|
||||
);
|
||||
|
||||
#define gnome_keyring_find_network_password CASA_gnome_keyring_find_network_password
|
||||
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_find_network_password_sync
|
||||
(
|
||||
const char *user,
|
||||
const char *domain,
|
||||
const char *server,
|
||||
const char *object,
|
||||
const char *protocol,
|
||||
const char *authtype,
|
||||
guint32 port,
|
||||
GList **result
|
||||
);
|
||||
|
||||
#define gnome_keyring_find_network_password_sync CASA_gnome_keyring_find_network_password_sync
|
||||
|
||||
gpointer CASA_gnome_keyring_set_network_password
|
||||
(
|
||||
const char *keyring,
|
||||
const char *user,
|
||||
const char *domain,
|
||||
const char *server,
|
||||
const char *object,
|
||||
const char *protocol,
|
||||
const char *authtype,
|
||||
guint32 port,
|
||||
const char *password,
|
||||
CASA_GnomeKeyringOperationGetIntCallback_T callback,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_data
|
||||
);
|
||||
|
||||
#define gnome_keyring_set_network_password CASA_gnome_keyring_set_network_password
|
||||
|
||||
CASA_GnomeKeyringResult_T CASA_gnome_keyring_set_network_password_sync
|
||||
(
|
||||
const char *keyring,
|
||||
const char *user,
|
||||
const char *domain,
|
||||
const char *server,
|
||||
const char *object,
|
||||
const char *protocol,
|
||||
const char *authtype,
|
||||
guint32 port,
|
||||
const char *password,
|
||||
guint32 *item_id
|
||||
);
|
||||
|
||||
#define gnome_keyring_set_network_password_sync CASA_gnome_keyring_set_network_password_sync
|
||||
|
||||
|
||||
#endif /* _CASA_GNOME_KEYRING_H */
|
||||
15
adlib/ad_gk/native/link.lux
Normal file
15
adlib/ad_gk/native/link.lux
Normal file
@@ -0,0 +1,15 @@
|
||||
LINK = $(CPP) \
|
||||
-Wl,-Bsymbolic \
|
||||
-shared \
|
||||
-pthread\
|
||||
-O2 -fno-exceptions -fno-check-new\
|
||||
-Wl,-rpath -Wl,/usr/lib$(ARC) \
|
||||
-L/usr/lib$(ARC) -lpthread -lc -ldl \
|
||||
-L/opt/gnome/lib$(ARC) -lglib-2.0 \
|
||||
-Wl,-soname -Wl,lib$(TARGET).so.$(PROD_NUM) \
|
||||
-o $(LIBDIR)$(XTRA)/lib$(TARGET).so.$(BLD_VER) \
|
||||
-L$(LIBDIR)$(XTRA) \
|
||||
$(OBJDIR)*.$(O)
|
||||
|
||||
|
||||
|
||||
2
adlib/ad_gk/native/objs.lux
Normal file
2
adlib/ad_gk/native/objs.lux
Normal file
@@ -0,0 +1,2 @@
|
||||
OBJS=\
|
||||
ad_gk.$(O)
|
||||
Reference in New Issue
Block a user