/*

                                   _JNJ`                        
                               .JNMH`                           
                              JMMF`       `;.                   
                            .NMM)          `MN.                 
                            MMM)            (MML                
                           (MMM`             MMML               
                     M  I  D  N  I  G  H  T    C  o  D  E       
                           (NMMF             MHNH               
                            NMML            .MMM                
                             NMML          .NMH                 
                              4MMNL       .#F                   
                               `4HNNL_   `                      
                                   `"""`                        

                          Copyright (C) 2004-2007
       "Ian (Larry) Latter" <ian dot latter at midnightcode dot org>

    Midnight Code is a registered trademark of Ian Latter.

    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, and mirrored at the Midnight Code web
    site; as at version 2 of the License only.
  
    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
    (version 2) along with this program; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA, or see http://midnightcode.org/gplv2.txt

*/


/* midnightcode-license.h :: Midnight Code license library		*/


#ifndef __MIDNIGHTCODE_LICENSE_H
#define __MIDNIGHTCODE_LICENSE_H 1


#define MIDNIGHTCODE_LICENSE_NODEID_SIZE 10

enum midnightcode_license_text_t
{
  MIDNIGHTCODE_LICENSE_TEXT_NONE = 0,
  MIDNIGHTCODE_LICENSE_TEXT_COPYRIGHT = 1,
  MIDNIGHTCODE_LICENSE_TEXT_TRADEMARK = 2,
  MIDNIGHTCODE_LICENSE_TEXT_GPLV2 = 4,
  MIDNIGHTCODE_LICENSE_TEXT_WARRANTY = 8,
  MIDNIGHTCODE_LICENSE_TEXT_GETGPL = 16,
  MIDNIGHTCODE_LICENSE_TEXT_ALL = 255
};

enum midnightcode_license_nodeid_t
{
  MIDNIGHTCODE_LICENSE_NODEID_DEFAULT = 0,
  MIDNIGHTCODE_LICENSE_NODEID_SHORT = 1,
  MIDNIGHTCODE_LICENSE_NODEID_FULL = 2
};

int midnightcode_license_buffer(char ** buffer, int padding, int style,
                     int sections);
void midnightcode_license(int padding, int style, int sections);
int midnightcode_license_get_nodeid(char * id, int options,
                     struct in_addr * ipv4_address);
int midnightcode_license_get_permid(void);

#endif
