00001 /* 00002 * libopensync - A synchronization framework 00003 * Copyright (C) 2008 Daniel Gollub <dgollub@suse.de> 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 * 00019 */ 00020 00021 #ifndef _OPENSYNC_PLUGIN_AUTHENTICATON_H_ 00022 #define _OPENSYNC_PLUGIN_AUTHENTICATON_H_ 00023 00031 00035 typedef enum { 00037 OSYNC_PLUGIN_AUTHENTICATION_USERNAME = (1 << 0), 00039 OSYNC_PLUGIN_AUTHENTICATION_PASSWORD = (1 << 1), 00041 OSYNC_PLUGIN_AUTHENTICATION_REFERENCE = (1 << 2), 00042 } OSyncPluginAuthenticationOptionSupportedFlag; 00043 00047 typedef unsigned int OSyncPluginAuthenticationOptionSupportedFlags; 00048 00055 OSYNC_EXPORT OSyncPluginAuthentication *osync_plugin_authentication_new(OSyncError **error); 00056 00062 OSYNC_EXPORT void osync_plugin_authentication_unref(OSyncPluginAuthentication *auth); 00063 00070 OSYNC_EXPORT OSyncPluginAuthentication *osync_plugin_authentication_ref(OSyncPluginAuthentication *auth); 00071 00072 00080 OSYNC_EXPORT osync_bool osync_plugin_authentication_option_is_supported(OSyncPluginAuthentication *auth, OSyncPluginAuthenticationOptionSupportedFlag flag); 00081 00088 OSYNC_EXPORT void osync_plugin_authentication_option_set_supported(OSyncPluginAuthentication *auth, OSyncPluginAuthenticationOptionSupportedFlags flags); 00089 00090 00097 OSYNC_EXPORT const char *osync_plugin_authentication_get_username(OSyncPluginAuthentication *auth); 00098 00105 OSYNC_EXPORT void osync_plugin_authentication_set_username(OSyncPluginAuthentication *auth, const char *username); 00106 00107 00114 OSYNC_EXPORT const char *osync_plugin_authentication_get_password(OSyncPluginAuthentication *auth); 00115 00127 OSYNC_EXPORT void osync_plugin_authentication_set_password(OSyncPluginAuthentication *auth, const char *password); 00128 00129 00140 OSYNC_EXPORT const char *osync_plugin_authentication_get_reference(OSyncPluginAuthentication *auth); 00141 00152 OSYNC_EXPORT void osync_plugin_authentication_set_reference(OSyncPluginAuthentication *auth, const char *reference); 00153 00156 #endif /*_OPENSYNC_PLUGIN_AUTHENTICATON_H_*/ 00157
1.5.7.1