lumiera_/src/common/interface-descriptor.h
Ichthyostega 806db414dd Copyright: clarify and simplify the file headers
* Lumiera source code always was copyrighted by individual contributors
 * there is no entity "Lumiera.org" which holds any copyrights
 * Lumiera source code is provided under the GPL Version 2+

== Explanations ==
Lumiera as a whole is distributed under Copyleft, GNU General Public License Version 2 or above.
For this to become legally effective, the ''File COPYING in the root directory is sufficient.''

The licensing header in each file is not strictly necessary, yet considered good practice;
attaching a licence notice increases the likeliness that this information is retained
in case someone extracts individual code files. However, it is not by the presence of some
text, that legally binding licensing terms become effective; rather the fact matters that a
given piece of code was provably copyrighted and published under a license. Even reformatting
the code, renaming some variables or deleting parts of the code will not alter this legal
situation, but rather creates a derivative work, which is likewise covered by the GPL!

The most relevant information in the file header is the notice regarding the
time of the first individual copyright claim. By virtue of this initial copyright,
the first author is entitled to choose the terms of licensing. All further
modifications are permitted and covered by the License. The specific wording
or format of the copyright header is not legally relevant, as long as the
intention to publish under the GPL remains clear. The extended wording was
based on a recommendation by the FSF. It can be shortened, because the full terms
of the license are provided alongside the distribution, in the file COPYING.
2024-11-17 23:42:55 +01:00

144 lines
7.2 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
INTERFACE-DESCRIPTOR.h - Metadata interface for Lumiera interfaces
Copyright (C)
2008, Christian Thaeter <ct@pipapo.org>
  **Lumiera** 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. See the file COPYING for further details.
*/
/** @file interface-descriptor.h
** A data record to describe interface, interface instances and plug-in
** instances. It is used by the _interface system_ to register, open
** and manage global extension points and separation interfaces between
** the components of the application.
**
*/
#ifndef COMMON_INTERFACEDESCRIPTOR_H
#define COMMON_INTERFACEDESCRIPTOR_H
#include "common/interface.h"
/**
* Release state of an interface implementation.
* The interface subsystem must be able to categorise implementations to present possible
* upgrade paths to the user. This is done by the tagging it to a certain state in concert
* with the version and the user supplied version compare function. The respective numbers
* are chosen in a way that a higher value indicates precedence when selecting an implementation.
* Note that 'BETA' is higher than 'DEPRECATED', we make the assumption that BETA is at least
* maintained code and something gets deprecated for some reason. For common practice it is
* suggested to make a stable release before declaring its predecessor version as deprecated.
*/
enum lumiera_interface_state {
/** some known bugs exist which won't be fixed, don't use this */
LUMIERA_INTERFACE_BROKEN = -1,
/** Not finished development code */
LUMIERA_INTERFACE_EXPERIMENTAL = 0,
/** Old implementation which is now unmaintained and will be removed soon */
LUMIERA_INTERFACE_DEPRECATED = 1,
/** Finished but not finally released implementation for open testing */
LUMIERA_INTERFACE_BETA = 2,
/** Finished, released and maintained implementation */
LUMIERA_INTERFACE_STABLE = 3
};
/**
* Interface descriptor.
* This defines an interface for querying metadata common to all interface implementations
*/
LUMIERA_INTERFACE_DECLARE (lumieraorg_interfacedescriptor, 0,
/* The following slots are some human-readable descriptions of certain properties */
LUMIERA_INTERFACE_SLOT (const char*, name, (LumieraInterface)),
LUMIERA_INTERFACE_SLOT (const char*, brief, (LumieraInterface)),
LUMIERA_INTERFACE_SLOT (const char*, homepage, (LumieraInterface)),
LUMIERA_INTERFACE_SLOT (const char*, version, (LumieraInterface)),
LUMIERA_INTERFACE_SLOT (const char*, author, (LumieraInterface)),
LUMIERA_INTERFACE_SLOT (const char*, email, (LumieraInterface)),
LUMIERA_INTERFACE_SLOT (const char*, copyright, (LumieraInterface)),
LUMIERA_INTERFACE_SLOT (const char*, license, (LumieraInterface)),
/* some flags for properties */
LUMIERA_INTERFACE_SLOT (int, state, (LumieraInterface)),
/* compare 2 version strings in a custom way */
LUMIERA_INTERFACE_SLOT (int, versioncmp, (const char*, const char*))
);
#if 0
/**
* For convenience: a copy'n'paste descriptor
*/
LUMIERA_INTERFACE_INSTANCE (lumieraorg_interfacedescriptor, 0,
/*IDENTIFIER*/,
NULL, NULL, NULL,
LUMIERA_INTERFACE_INLINE (name, LUIDGEN,
const char*, (LumieraInterface iface),
{return /*NAME*/;}
),
LUMIERA_INTERFACE_INLINE (brief, LUIDGEN,
const char*, (LumieraInterface iface),
{return /*BRIEF*/;}
),
LUMIERA_INTERFACE_INLINE (homepage, LUIDGEN,
const char*, (LumieraInterface iface),
{return /*HOMEPAGE*/;}
),
LUMIERA_INTERFACE_INLINE (version, LUIDGEN,
const char*, (LumieraInterface iface),
{return /*VERSION*/;}
),
LUMIERA_INTERFACE_INLINE (author, LUIDGEN,
const char*, (LumieraInterface iface),
{return /*AUTHOR*/;}
),
LUMIERA_INTERFACE_INLINE (email, LUIDGEN,
const char*, (LumieraInterface iface),
{return /*EMAIL*/;}
),
LUMIERA_INTERFACE_INLINE (copyright, LUIDGEN,
const char*, (LumieraInterface iface),
{
return
"Copyright (C) "/*ORGANIZATION*/"\n"
" "/*YEARS*/" "/*AUTHOR*/" <"/*EMAIL*/">";
}
),
LUMIERA_INTERFACE_INLINE (license, LUIDGEN,
const char*, (LumieraInterface iface),
{
return
/*LICENSE*/;
}
),
LUMIERA_INTERFACE_INLINE (state, LUIDGEN,
int, (LumieraInterface iface),
{return /*LUMIERA_INTERFACE_EXPERIMENTAL*/;}
),
LUMIERA_INTERFACE_INLINE (versioncmp, LUIDGEN,
int, (const char* a, const char* b),
{return /*COMPARERESULT*/;}
)
);
#endif
#endif /* COMMON_INTERFACEDESCRIPTOR_H */
/*
// Local Variables:
// mode: C
// c-file-style: "gnu"
// indent-tabs-mode: nil
// End:
*/