mirror of
https://github.com/acanas/swad-core.git
synced 2024-09-24 00:01:03 +02:00
84 lines
3.6 KiB
C
84 lines
3.6 KiB
C
// 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.
|
|
Copyright (C) 1999-2017 Antonio Cañas Vargas
|
|
|
|
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 *******************************/
|
|
/*****************************************************************************/
|
|
|
|
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
|
|
long NumFileViews; // -1L ==> unknown number of file views
|
|
long NumForPst; // -1L ==> unknown number of forum posts
|
|
long NumMsgSnt; // -1L ==> unknown number of messages sent
|
|
};
|
|
|
|
/*****************************************************************************/
|
|
/****************************** Public prototypes ****************************/
|
|
/*****************************************************************************/
|
|
|
|
void Prf_SeeSocialProfiles (void);
|
|
|
|
char *Prf_GetURLPublicProfile (char *URL,const char *NicknameWithoutArroba);
|
|
void Prf_PutLinkMyPublicProfile (void);
|
|
void Prf_PutLinkRequestAnotherUserProfile (void);
|
|
void Prf_RequestUserProfile (void);
|
|
void Prf_GetUsrDatAndShowUserProfile (void);
|
|
|
|
bool Prf_ShowUserProfile (struct UsrData *UsrDat);
|
|
void Prf_ChangeProfileVisibility (void);
|
|
|
|
void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat);
|
|
void Prf_GetUsrFigures (long UsrCod,struct UsrFigures *UsrFigures);
|
|
void Prf_CalculateFigures (void);
|
|
bool Prf_GetAndStoreAllUsrFigures (long UsrCod,struct UsrFigures *UsrFigures);
|
|
|
|
void Prf_CreateNewUsrFigures (long UsrCod,bool CreatingMyOwnAccount);
|
|
void Prf_RemoveUsrFigures (long UsrCod);
|
|
void Prf_IncrementNumClicksUsr (long UsrCod);
|
|
void Prf_IncrementNumFileViewsUsr (long UsrCod);
|
|
void Prf_IncrementNumForPstUsr (long UsrCod);
|
|
void Prf_IncrementNumMsgSntUsr (long UsrCod);
|
|
|
|
void Prf_GetAndShowRankingClicks (void);
|
|
void Prf_GetAndShowRankingFileViews (void);
|
|
void Prf_GetAndShowRankingForPst (void);
|
|
void Prf_GetAndShowRankingMsgSnt (void);
|
|
void Prf_ShowRankingFigure (const char *Query);
|
|
void Prf_GetAndShowRankingClicksPerDay (void);
|
|
void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank);
|
|
|
|
#endif
|