This commit is contained in:
Paul Schneider 2026-02-28 21:17:54 +00:00
commit 40e8e08690
3487 changed files with 39 additions and 21 deletions

View file

@ -0,0 +1,43 @@
//
// ICalendarManager.cs
//
// Author:
// Paul Schneider <paul@pschneider.fr>
//
// Copyright (c) 2015 GNU GPL
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using Google.Apis.Calendar.v3.Data;
namespace Yavsc.Services
{
using System.Threading.Tasks;
using Yavsc.ViewModels.Calendar;
/// <summary>
/// I calendar manager.
/// </summary>
public interface ICalendarManager {
Task<CalendarList> GetCalendarsAsync (string pageToken);
Task<Events> GetCalendarAsync (string calid, DateTime minDate, DateTime maxDate, string pageToken);
Task<DateTimeChooserViewModel> CreateViewModelAsync(
string inputId,
string calid, DateTime mindate, DateTime maxdate);
Task<Event> CreateEventAsync(string userId, string calid,
DateTime startDate, int lengthInSeconds, string summary,
string description, string location, bool available);
}
}

View file

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using Yavsc.ViewModels.Chat;
namespace Yavsc.Services
{
public interface IConnexionManager {
void SetUserName(string cxId, string userName);
string GetUserName (string cxId);
void OnConnected(string cxId, bool isCop);
bool IsConnected(string candidate);
void OnDisctonnected (string cxId);
bool IsPresent(string roomName, string userName);
ChatRoomInfo Join(string roomName, string cxId);
bool Part(string cxId, string roomName, string reason);
bool Kick(string cxId, string userName, string roomName, string reason);
bool Op(string roomName, string userName);
bool Deop(string roomName, string userName);
bool Hop(string roomName, string userName);
bool Dehop(string roomName, string userName);
bool TryGetChanInfo(string room, out ChatRoomInfo chanInfo);
IEnumerable<string> GetConnexionIds(string userName);
void SetErrorHandler(Action<string,string> errorHandler);
IEnumerable<ChannelShortInfo> ListChannels(string pattern);
}
}

View file

@ -0,0 +1,12 @@
using System;
namespace Yavsc.Services
{
public interface IDiskUsageTracker
{
bool GetSpace(string userName, long space);
void Release(string userName, long space);
}
}

View file

@ -0,0 +1,54 @@
// FreeDate.cs
//
// Author:
// Paul Schneider <paulschneider@free.fr>
//
// Copyright (c) 2015 Paul Schneider
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using System.Collections.Generic;
using Yavsc.Server.Models.Calendar;
namespace Yavsc.Models.Calendar
{
/// <summary>
/// Free date.
/// </summary>
public interface IFreeDateSet
{
/// <summary>
/// Gets or sets the reference.
/// </summary>
/// <value>The reference.</value>
IEnumerable<Period> Values { get; set; }
/// <summary>
/// Gets or sets the duration.
/// </summary>
/// <value>The duration.</value>
TimeSpan Duration { get; set; }
/// <summary>
/// Gets or sets the attendees.
/// </summary>
/// <value>The attendees.</value>
string UserName { get; set; }
/// <summary>
/// Gets or sets the location.
/// </summary>
/// <value>The location.</value>
string Location { get; set; }
}
}

View file

@ -0,0 +1,26 @@
using System.Collections.Concurrent;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Yavsc.Models;
using Yavsc.ViewModels.Streaming;
namespace Yavsc.Services
{
public interface ILiveProcessor {
/// <summary>
/// instance keeping reference on
/// all collections of casting and listenning websockets
/// </summary>
/// <value></value>
ConcurrentDictionary<string, LiveCastHandler> Casters { get; }
/// <summary>
/// Try and accept websocket from aspnet http context
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
Task<bool> AcceptStream (HttpContext context, ApplicationUser user, string destDir, string fileName);
}
}

View file

@ -0,0 +1,36 @@
//
// IScheduledEvent.cs
//
// Author:
// Paul Schneider <paulschneider@free.fr>
//
// Copyright (c) 2015 - 2017 Paul Schneider
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using Yavsc.Server.Models.Calendar;
namespace Yavsc.Models.Calendar
{
public interface IScheduledEvent
{
/// <summary>
/// Gets or sets the period.
/// </summary>
/// <value>The period.</value>
Periodicity Reccurence { get; set; }
Period Period { get; set; }
}
}

View file

@ -0,0 +1,10 @@
using System.Threading.Tasks;
namespace Yavsc.Services
{
public interface ISmsSender
{
Task SendSmsAsync(TwilioSettings settings, string number, string message);
}
}

View file

@ -0,0 +1,7 @@
namespace Yavsc.Server
{
public interface ITranslator
{
string[] Translate (string slang, string dlang, string[] text);
}
}

View file

@ -0,0 +1,15 @@
namespace Yavsc.Interface
{
public interface ITrueEmailSender
{
//
// Résumé :
// This API supports the ASP.NET Core Identity default UI infrastructure and is
// not intended to be used directly from your code. This API may change or be removed
// in future releases.
Task<string> SendEmailAsync(string name, string email, string subject, string htmlMessage);
}
}

View file

@ -0,0 +1,28 @@

using System.Collections.Generic;
using System.Threading.Tasks;
using Yavsc.Interfaces.Workflow;
using Yavsc.Models.Google.Messaging;
using Yavsc.Models.Haircut;
using Yavsc.Models.Messaging;
namespace Yavsc.Services
{
public interface IYavscMessageSender
{
Task<MessageWithPayloadResponse> NotifyBookQueryAsync(
IEnumerable<string> connectionIds,
RdvQueryEvent ev);
Task<MessageWithPayloadResponse> NotifyEstimateAsync(
IEnumerable<string> connectionIds,
EstimationEvent ev);
Task<MessageWithPayloadResponse> NotifyHairCutQueryAsync(
IEnumerable<string> connectionIds,
HairCutQueryEvent ev);
Task<MessageWithPayloadResponse> NotifyAsync(
IEnumerable<string> connectionIds,
IEvent yaev);
}
}