swad-core/swad_place.h

80 lines
2.6 KiB
C
Raw Permalink Normal View History

2014-12-01 23:55:08 +01:00
// swad_place.h: places
#ifndef _SWAD_PLC
#define _SWAD_PLC
/*
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-2024 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 **********************************/
/*****************************************************************************/
2018-12-29 15:03:30 +01:00
#include "swad_string.h"
2014-12-01 23:55:08 +01:00
/*****************************************************************************/
/************************** Public types and constants ***********************/
/*****************************************************************************/
2020-04-13 21:26:47 +02:00
struct Plc_Place
2014-12-01 23:55:08 +01:00
{
long PlcCod;
long InsCod;
char ShrtName[Nam_MAX_BYTES_SHRT_NAME + 1];
char FullName[Nam_MAX_BYTES_FULL_NAME + 1];
2014-12-01 23:55:08 +01:00
unsigned NumCtrs;
};
2017-01-29 21:41:08 +01:00
#define Plc_NUM_ORDERS 2
2014-12-01 23:55:08 +01:00
typedef enum
{
Plc_ORDER_BY_PLACE = 0,
Plc_ORDER_BY_NUM_CTRS = 1,
2017-01-29 12:42:19 +01:00
} Plc_Order_t;
#define Plc_ORDER_DEFAULT Plc_ORDER_BY_NUM_CTRS
2014-12-01 23:55:08 +01:00
2020-04-13 21:26:47 +02:00
struct Plc_Places
{
unsigned Num; // Number of places
struct Plc_Place *Lst; // List of places
Plc_Order_t SelectedOrder;
};
2014-12-01 23:55:08 +01:00
/*****************************************************************************/
/***************************** Public prototypes *****************************/
/*****************************************************************************/
2020-04-13 21:26:47 +02:00
void Plc_ResetPlaces (struct Plc_Places *Places);
void Plc_SeeAllPlaces (void);
2014-12-01 23:55:08 +01:00
void Plc_EditPlaces (void);
2018-11-15 10:41:11 +01:00
void Plc_PutIconToViewPlaces (void);
2020-04-13 21:26:47 +02:00
void Plc_GetListPlaces (struct Plc_Places *Places);
void Plc_FreeListPlaces (struct Plc_Places *Places);
void Plc_GetPlaceDataByCod (struct Plc_Place *Plc);
2014-12-01 23:55:08 +01:00
void Plc_RemovePlace (void);
void Plc_RenamePlaceShrt (void);
2014-12-01 23:55:08 +01:00
void Plc_RenamePlaceFull (void);
2019-04-09 00:24:50 +02:00
void Plc_ContEditAfterChgPlc (void);
void Plc_ReceiveNewPlace (void);
2014-12-01 23:55:08 +01:00
#endif