loudmouth/inc/lm-ssl-base.h
changeset 10 59927b2d3b75
parent 0 d0f3a028347a
equal deleted inserted replaced
0:d0f3a028347a 10:59927b2d3b75
     1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
       
     2 /*
       
     3  * Copyright (C) 2003-2006 Imendio AB
       
     4  *
       
     5  * This program is free software; you can redistribute it and/or
       
     6  * modify it under the terms of the GNU Lesser General Public License as
       
     7  * published by the Free Software Foundation; either version 2 of the
       
     8  * License, or (at your option) any later version.
       
     9  *
       
    10  * This program is distributed in the hope that it will be useful,
       
    11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    13  * Lesser General Public License for more details.
       
    14  *
       
    15  * You should have received a copy of the GNU Lesser General Public
       
    16  * License along with this program; if not, write to the
       
    17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       
    18  * Boston, MA 02111-1307, USA.
       
    19  */
       
    20 
       
    21 #ifndef __LM_SSL_BASE_H__
       
    22 #define __LM_SSL_BASE_H__
       
    23 
       
    24 #include "lm-ssl.h"
       
    25 
       
    26 #define LM_SSL_BASE(x) ((LmSSLBase *) x)
       
    27 
       
    28 typedef struct _LmSSLBase LmSSLBase;
       
    29 struct _LmSSLBase {
       
    30 	LmSSLFunction   func;
       
    31 	gpointer        func_data;
       
    32 	GDestroyNotify  data_notify;
       
    33 	gchar          *expected_fingerprint;
       
    34 	char            fingerprint[20];
       
    35 	gboolean        use_starttls;
       
    36 	gboolean        require_starttls;
       
    37 
       
    38 	gint            ref_count;
       
    39 };
       
    40 
       
    41 void _lm_ssl_base_init         (LmSSLBase      *base, 
       
    42 				const gchar    *expected_fingerprint,
       
    43 				LmSSLFunction   ssl_function,
       
    44 				gpointer        user_data,
       
    45 				GDestroyNotify  notify);
       
    46 
       
    47 void _lm_ssl_base_free_fields  (LmSSLBase      *base);
       
    48 
       
    49 #endif /* __LM_SSL_BASE_H__ */