swad-core/swad_plugin.h

82 lines
3.2 KiB
C
Raw Normal View History

2014-12-01 23:55:08 +01:00
// swad_plugin.h: plugins called from SWAD using web services
#ifndef _SWAD_PLG
#define _SWAD_PLG
/*
SWAD (Shared Workspace At a Distance in Spanish),
is a web platform developed at the University of Granada (Spain),
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2023 Antonio Ca<EFBFBD>as Vargas
2014-12-01 23:55:08 +01:00
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*****************************************************************************/
/********************************* Headers ***********************************/
/*****************************************************************************/
#include "swad_parameter.h"
2014-12-01 23:55:08 +01:00
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
2017-03-08 14:12:33 +01:00
#define Plg_MAX_CHARS_PLUGIN_NAME (32 - 1) // 31
#define Plg_MAX_BYTES_PLUGIN_NAME ((Plg_MAX_CHARS_PLUGIN_NAME + 1) * Str_MAX_BYTES_PER_CHAR - 1) // 511
2017-03-07 19:55:29 +01:00
2017-03-08 14:12:33 +01:00
#define Plg_MAX_CHARS_PLUGIN_DESCRIPTION (128 - 1) // 127
#define Plg_MAX_BYTES_PLUGIN_DESCRIPTION (Plg_MAX_CHARS_PLUGIN_DESCRIPTION * Str_MAX_BYTES_PER_CHAR) // 2047
2017-03-07 19:55:29 +01:00
2017-03-08 14:12:33 +01:00
#define Plg_MAX_CHARS_PLUGIN_LOGO (32 - 1) // 31
#define Plg_MAX_BYTES_PLUGIN_LOGO Plg_MAX_CHARS_PLUGIN_LOGO // 31
2017-03-07 19:55:29 +01:00
2017-03-08 14:12:33 +01:00
#define Plg_MAX_CHARS_PLUGIN_APP_KEY (32 - 1) // 31
#define Plg_MAX_BYTES_PLUGIN_APP_KEY Plg_MAX_CHARS_PLUGIN_APP_KEY // 31
2014-12-01 23:55:08 +01:00
/*****************************************************************************/
/******************************* Public types ********************************/
/*****************************************************************************/
struct Plg_Plugin
2014-12-01 23:55:08 +01:00
{
long PlgCod;
2017-03-08 01:21:21 +01:00
char Name[Plg_MAX_BYTES_PLUGIN_NAME + 1];
char Description[Plg_MAX_BYTES_PLUGIN_DESCRIPTION + 1];
char Logo[Plg_MAX_BYTES_PLUGIN_LOGO + 1];
char AppKey[Plg_MAX_BYTES_PLUGIN_APP_KEY + 1];
2017-03-07 01:56:41 +01:00
char URL[Cns_MAX_BYTES_WWW + 1];
char IP[Cns_MAX_BYTES_IP + 1];
2014-12-01 23:55:08 +01:00
};
/*****************************************************************************/
/****************************** Public prototypes ****************************/
/*****************************************************************************/
void Plg_ListPlugins (void);
void Plg_EditPlugins (void);
bool Plg_GetPluginDataByCod (struct Plg_Plugin *Plg);
2014-12-01 23:55:08 +01:00
void Plg_RemovePlugin (void);
void Plg_RenamePlugin (void);
void Plg_ChangePlgDescription (void);
void Plg_ChangePlgLogo (void);
void Plg_ChangePlgAppKey (void);
void Plg_ChangePlgURL (void);
void Plg_ChangePlgIP (void);
2019-04-09 18:46:13 +02:00
void Plg_ContEditAfterChgPlg (void);
2020-05-05 21:49:00 +02:00
void Plg_ReceiveFormNewPlg (void);
2014-12-01 23:55:08 +01:00
#endif