swad-core/swad_profile.h

82 lines
3.3 KiB
C
Raw Permalink 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.
Copyright (C) 1999-2024 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 **********************************/
/*****************************************************************************/
#include <time.h> // For time
#include "swad_user.h"
2015-03-14 17:39:04 +01:00
/*****************************************************************************/
/******************************** Public types *******************************/
/*****************************************************************************/
struct Prf_UsrFigures
2016-09-11 14:28:32 +02:00
{
time_t FirstClickTimeUTC; // 0 ==> unknown first click time of user never logged
int NumDays; // -1 ==> not applicable
int NumClicks; // -1 ==> unknown number of clicks
int NumTimelinePubs; // -1 ==> unknown number of timeline publications
int NumFileViews; // -1 ==> unknown number of file views
int NumForumPosts; // -1 ==> unknown number of forum posts
int NumMessagesSent; // -1 ==> unknown number of messages sent
2016-09-11 14:28:32 +02:00
};
2015-03-14 17:39:04 +01:00
/*****************************************************************************/
/****************************** Public prototypes ****************************/
/*****************************************************************************/
2016-02-06 13:45:33 +01:00
void Prf_SeeSocialProfiles (void);
char *Prf_GetURLPublicProfile (char URL[WWW_MAX_BYTES_WWW + 1],
const char *NickWithoutArr);
2017-02-17 01:59:58 +01:00
void Prf_PutLinkMyPublicProfile (void);
void Prf_PutLinkReqAnotherUsrProfile (void);
void Prf_ReqUserProfile (void);
2016-01-14 01:39:02 +01:00
void Prf_GetUsrDatAndShowUserProfile (void);
bool Prf_ShowUsrProfile (struct Usr_Data *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 Usr_Data *UsrDat);
void Prf_GetUsrFigures (long UsrCod,struct Prf_UsrFigures *UsrFigures);
2016-10-03 18:16:05 +02:00
void Prf_CalculateFigures (void);
bool Prf_GetAndStoreAllUsrFigures (long UsrCod,struct Prf_UsrFigures *UsrFigures);
2015-03-28 18:34:08 +01:00
void Prf_CreateNewUsrFigures (long UsrCod,Usr_MeOrOther_t MeOrOther);
2015-03-14 17:39:04 +01:00
2015-03-16 14:05:16 +01:00
void Prf_GetAndShowRankingClicks (void);
void Prf_GetAndShowRankingTimelinePubs (void);
2015-03-16 17:46:32 +01:00
void Prf_GetAndShowRankingFileViews (void);
void Prf_GetAndShowRankingForPsts (void);
void Prf_GetAndShowRankingMsgsSnt (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