sofia-sip/auth_client_plugin.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of the Sofia-SIP package
00003  *
00004  * Copyright (C) 2005 Nokia Corporation.
00005  *
00006  * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00021  * 02110-1301 USA
00022  *
00023  */
00024 
00025 #ifndef AUTH_CLIENT_PLUGIN_H
00026 
00027 #define AUTH_CLIENT_PLUGIN_H 
00028 
00037 #ifndef AUTH_CLIENT_H
00038 #include "sofia-sip/auth_client.h"
00039 #endif
00040 
00041 #ifndef MSG_HEADER_H
00042 #include <sofia-sip/msg_header.h>
00043 #endif
00044 
00045 SOFIA_BEGIN_DECLS
00046 
00047 /* ====================================================================== */
00048 
00049 struct auth_client_s {
00050   su_home_t     ca_home[1];
00051   auth_client_plugin_t const *ca_auc;
00052 
00053   auth_client_t *ca_next;
00054 
00055   char const   *ca_scheme;
00056   char const   *ca_realm;
00057   char         *ca_user;
00058   char         *ca_pass;
00059 
00060   msg_hclass_t *ca_credential_class;
00061 };
00062 
00063 struct auth_client_plugin
00064 {
00065   int auc_plugin_size, auc_size;
00066   char const *auc_name;
00067   
00069   int (*auc_challenge)(auth_client_t *ca, 
00070                        msg_auth_t const *ch);
00071 
00073   int (*auc_authorize)(auth_client_t *ca, 
00074                        su_home_t *h,
00075                        char const *method, 
00076                        url_t const *url, 
00077                        msg_payload_t const *body,
00078                        msg_header_t **return_headers);
00079 
00080   
00081 };
00082 
00083 SOFIA_END_DECLS
00084 
00085 #endif /* !defined AUTH_CLIENT_PLUGIN_H */

Sofia-SIP 1.12.1 - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.