swad-core/swad_profile.h

88 lines
3.8 KiB
C
Raw Normal View History

2015-03-14 17:39:04 +01:00
// swad_profile.h: user's public profile
#ifndef _SWAD_PRF
#define _SWAD_PRF
/*
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.
2019-01-07 21:52:19 +01:00
Copyright (C) 1999-2019 Antonio Ca<EFBFBD>as Vargas
2015-03-14 17:39:04 +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 **********************************/
/*****************************************************************************/
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
/*****************************************************************************/
/******************************** Public types *******************************/
/*****************************************************************************/
2016-09-11 14:28:32 +02:00
struct UsrFigures
{
time_t FirstClickTimeUTC; // 0 ==> unknown first click time of user never logged
int NumDays; // -1 ==> not applicable
long NumClicks; // -1L ==> unknown number of clicks
2019-03-06 10:13:39 +01:00
long NumSocPub; // -1L ==> unknown number of social publications
2016-09-11 14:28:32 +02:00
long NumFileViews; // -1L ==> unknown number of file views
long NumForPst; // -1L ==> unknown number of forum posts
long NumMsgSnt; // -1L ==> unknown number of messages sent
};
2015-03-14 17:39:04 +01:00
/*****************************************************************************/
/****************************** Public prototypes ****************************/
/*****************************************************************************/
2016-02-06 13:45:33 +01:00
void Prf_SeeSocialProfiles (void);
2018-10-18 02:02:32 +02:00
char *Prf_GetURLPublicProfile (char URL[Cns_MAX_BYTES_WWW + 1],
const char *NicknameWithoutArroba);
2017-02-17 01:59:58 +01:00
void Prf_PutLinkMyPublicProfile (void);
void Prf_PutLinkRequestAnotherUserProfile (void);
2015-03-14 17:39:04 +01:00
void Prf_RequestUserProfile (void);
2016-01-14 01:39:02 +01:00
void Prf_GetUsrDatAndShowUserProfile (void);
2016-06-12 19:55:33 +02:00
bool Prf_ShowUserProfile (struct UsrData *UsrDat);
2019-03-22 15:21:46 +01:00
void Prf_ChangeBasicProfileVis (void);
void Prf_ChangeExtendedProfileVis (void);
2016-06-17 11:13:11 +02:00
void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat);
2016-09-11 14:28:32 +02:00
void Prf_GetUsrFigures (long UsrCod,struct UsrFigures *UsrFigures);
2016-10-03 18:16:05 +02:00
void Prf_CalculateFigures (void);
bool Prf_GetAndStoreAllUsrFigures (long UsrCod,struct UsrFigures *UsrFigures);
2015-03-28 18:34:08 +01:00
2016-11-08 00:58:32 +01:00
void Prf_CreateNewUsrFigures (long UsrCod,bool CreatingMyOwnAccount);
2015-03-14 17:39:04 +01:00
void Prf_RemoveUsrFigures (long UsrCod);
void Prf_IncrementNumClicksUsr (long UsrCod);
2019-03-06 10:13:39 +01:00
void Prf_IncrementNumSocPubUsr (long UsrCod);
2015-03-14 17:39:04 +01:00
void Prf_IncrementNumFileViewsUsr (long UsrCod);
void Prf_IncrementNumForPstUsr (long UsrCod);
void Prf_IncrementNumMsgSntUsr (long UsrCod);
2015-03-16 14:05:16 +01:00
void Prf_GetAndShowRankingClicks (void);
2019-03-06 13:14:40 +01:00
void Prf_GetAndShowRankingSocPub (void);
2015-03-16 17:46:32 +01:00
void Prf_GetAndShowRankingFileViews (void);
void Prf_GetAndShowRankingForPst (void);
void Prf_GetAndShowRankingMsgSnt (void);
2018-11-01 19:23:52 +01:00
void Prf_ShowRankingFigure (MYSQL_RES **mysql_res,unsigned NumUsrs);
2015-03-16 14:05:16 +01:00
void Prf_GetAndShowRankingClicksPerDay (void);
2015-03-14 17:39:04 +01:00
#endif