2015-12-31 14:25:28 +01:00
|
|
|
|
// swad_social.c: social networking (timeline)
|
2015-12-28 19:23:42 +01:00
|
|
|
|
|
|
|
|
|
#ifndef _SWAD_SOC
|
|
|
|
|
#define _SWAD_SOC
|
|
|
|
|
/*
|
|
|
|
|
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.
|
2016-01-01 20:19:43 +01:00
|
|
|
|
Copyright (C) 1999-2016 Antonio Ca<EFBFBD>as Vargas
|
2015-12-28 19:23:42 +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-01-11 20:54:14 +01:00
|
|
|
|
#define Soc_NUM_PUB_TYPES 4
|
|
|
|
|
// If the numbers assigned to each event type change,
|
|
|
|
|
// it is necessary to change old numbers to new ones in database table social_notes
|
2016-01-11 14:42:54 +01:00
|
|
|
|
typedef enum
|
|
|
|
|
{
|
2016-01-11 20:54:14 +01:00
|
|
|
|
Soc_PUB_UNKNOWN = 0,
|
|
|
|
|
Soc_PUB_ORIGINAL_NOTE = 1,
|
|
|
|
|
Soc_PUB_SHARED_NOTE = 2,
|
|
|
|
|
Soc_PUB_COMMENT_TO_NOTE = 3,
|
2016-01-11 14:42:54 +01:00
|
|
|
|
} Soc_PubType_t;
|
|
|
|
|
|
2016-01-11 20:54:14 +01:00
|
|
|
|
#define Soc_NUM_NOTE_TYPES 13
|
2015-12-28 19:23:42 +01:00
|
|
|
|
// If the numbers assigned to each event type change,
|
2015-12-31 14:25:28 +01:00
|
|
|
|
// it is necessary to change old numbers to new ones in database table social_notes
|
2015-12-28 19:23:42 +01:00
|
|
|
|
typedef enum
|
|
|
|
|
{
|
2015-12-31 14:25:28 +01:00
|
|
|
|
Soc_NOTE_UNKNOWN = 0,
|
2015-12-28 19:23:42 +01:00
|
|
|
|
|
|
|
|
|
/* Institution tab */
|
2015-12-31 14:25:28 +01:00
|
|
|
|
Soc_NOTE_INS_DOC_PUB_FILE = 1,
|
|
|
|
|
Soc_NOTE_INS_SHA_PUB_FILE = 2,
|
2015-12-28 19:23:42 +01:00
|
|
|
|
|
|
|
|
|
/* Centre tab */
|
2015-12-31 14:25:28 +01:00
|
|
|
|
Soc_NOTE_CTR_DOC_PUB_FILE = 3,
|
|
|
|
|
Soc_NOTE_CTR_SHA_PUB_FILE = 4,
|
2015-12-28 19:23:42 +01:00
|
|
|
|
|
|
|
|
|
/* Degree tab */
|
2015-12-31 14:25:28 +01:00
|
|
|
|
Soc_NOTE_DEG_DOC_PUB_FILE = 5,
|
|
|
|
|
Soc_NOTE_DEG_SHA_PUB_FILE = 6,
|
2015-12-28 19:23:42 +01:00
|
|
|
|
|
|
|
|
|
/* Course tab */
|
2015-12-31 14:25:28 +01:00
|
|
|
|
Soc_NOTE_CRS_DOC_PUB_FILE = 7,
|
|
|
|
|
Soc_NOTE_CRS_SHA_PUB_FILE = 8,
|
2015-12-28 19:23:42 +01:00
|
|
|
|
|
|
|
|
|
/* Assessment tab */
|
2015-12-31 14:25:28 +01:00
|
|
|
|
Soc_NOTE_EXAM_ANNOUNCEMENT = 9,
|
2015-12-28 19:23:42 +01:00
|
|
|
|
|
2015-12-29 10:38:46 +01:00
|
|
|
|
/* Users tab */
|
2015-12-28 19:23:42 +01:00
|
|
|
|
|
|
|
|
|
/* Social tab */
|
2016-01-02 13:21:25 +01:00
|
|
|
|
Soc_NOTE_SOCIAL_POST = 10,
|
2015-12-31 14:25:28 +01:00
|
|
|
|
Soc_NOTE_FORUM_POST = 11,
|
2015-12-28 19:23:42 +01:00
|
|
|
|
|
|
|
|
|
/* Messages tab */
|
2015-12-31 14:25:28 +01:00
|
|
|
|
Soc_NOTE_NOTICE = 12,
|
2015-12-28 19:23:42 +01:00
|
|
|
|
|
|
|
|
|
/* Statistics tab */
|
|
|
|
|
|
|
|
|
|
/* Profile tab */
|
|
|
|
|
|
2015-12-31 18:40:45 +01:00
|
|
|
|
} Soc_NoteType_t;
|
2015-12-28 19:23:42 +01:00
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/****************************** Public prototypes ****************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2016-01-02 01:56:48 +01:00
|
|
|
|
void Soc_ShowTimelineGbl (void);
|
2016-01-15 14:46:44 +01:00
|
|
|
|
void Soc_ShowTimelineUsr (void);
|
2016-01-14 01:39:02 +01:00
|
|
|
|
|
|
|
|
|
void Soc_RefreshNewTimelineGbl (void);
|
|
|
|
|
|
|
|
|
|
void Soc_RefreshOldTimelineGbl (void);
|
2016-01-15 14:46:44 +01:00
|
|
|
|
void Soc_RefreshOldTimelineUsr (void);
|
2015-12-28 19:23:42 +01:00
|
|
|
|
|
2016-01-15 14:46:44 +01:00
|
|
|
|
long Soc_StoreAndPublishSocialNote (Soc_NoteType_t NoteType,long Cod);
|
2016-01-03 19:30:59 +01:00
|
|
|
|
void Soc_MarkSocialNoteAsUnavailableUsingNotCod (long NotCod);
|
|
|
|
|
void Soc_MarkSocialNoteAsUnavailableUsingNoteTypeAndCod (Soc_NoteType_t NoteType,long Cod);
|
2016-01-04 01:56:28 +01:00
|
|
|
|
void Soc_MarkSocialNoteOneFileAsRemoved (const char *Path);
|
|
|
|
|
void Soc_MarkSocialNotesChildrenOfFolderAsUnavailable (const char *Path);
|
2015-12-28 20:46:48 +01:00
|
|
|
|
|
2016-01-02 01:56:48 +01:00
|
|
|
|
void Soc_ReceiveSocialPostGbl (void);
|
|
|
|
|
void Soc_ReceiveSocialPostUsr (void);
|
2015-12-30 12:40:13 +01:00
|
|
|
|
|
2016-01-07 14:21:21 +01:00
|
|
|
|
void Soc_ReceiveCommentGbl (void);
|
|
|
|
|
void Soc_ReceiveCommentUsr (void);
|
2016-01-07 00:42:35 +01:00
|
|
|
|
|
2016-01-04 02:54:04 +01:00
|
|
|
|
void Soc_ShareSocialNoteGbl (void);
|
|
|
|
|
void Soc_ShareSocialNoteUsr (void);
|
2016-01-19 00:50:35 +01:00
|
|
|
|
void Soc_FavSocialNoteGbl (void);
|
|
|
|
|
void Soc_FavSocialNoteUsr (void);
|
2016-01-19 12:54:27 +01:00
|
|
|
|
void Soc_FavSocialCommentGbl (void);
|
|
|
|
|
void Soc_FavSocialCommentUsr (void);
|
2016-01-19 00:50:35 +01:00
|
|
|
|
|
2016-01-16 01:37:37 +01:00
|
|
|
|
void Soc_UnshareSocialNoteGbl (void);
|
|
|
|
|
void Soc_UnshareSocialNoteUsr (void);
|
2016-01-19 00:50:35 +01:00
|
|
|
|
void Soc_UnfavSocialNoteGbl (void);
|
|
|
|
|
void Soc_UnfavSocialNoteUsr (void);
|
2016-01-19 12:54:27 +01:00
|
|
|
|
void Soc_UnfavSocialCommentGbl (void);
|
|
|
|
|
void Soc_UnfavSocialCommentUsr (void);
|
2016-01-01 20:19:43 +01:00
|
|
|
|
|
2016-01-08 01:53:37 +01:00
|
|
|
|
void Soc_RequestRemSocialNoteGbl (void);
|
|
|
|
|
void Soc_RequestRemSocialNoteUsr (void);
|
|
|
|
|
void Soc_RemoveSocialNoteGbl (void);
|
|
|
|
|
void Soc_RemoveSocialNoteUsr (void);
|
|
|
|
|
|
|
|
|
|
void Soc_RequestRemSocialComGbl (void);
|
|
|
|
|
void Soc_RequestRemSocialComUsr (void);
|
|
|
|
|
void Soc_RemoveSocialComGbl (void);
|
|
|
|
|
void Soc_RemoveSocialComUsr (void);
|
2015-12-30 02:08:08 +01:00
|
|
|
|
|
2016-01-08 10:13:28 +01:00
|
|
|
|
void Soc_RemoveUsrSocialContent (long UsrCod);
|
|
|
|
|
|
2016-01-12 20:58:19 +01:00
|
|
|
|
void Soc_ClearOldTimelinesDB (void);
|
|
|
|
|
|
2015-12-28 19:23:42 +01:00
|
|
|
|
#endif
|