Initial Commit ...

This commit is contained in:
2024-01-25 04:47:14 +03:30
commit d862146642
37 changed files with 4039 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
using System;
namespace xPushService.Models {
/// <summary>
/// Describe a Hub to Register ...
/// </summary>
public class XHubDescriptor {
/// <summary>
/// Specified the Hub Route ...
/// </summary>
/// <value></value>
public string Route { get; set; }
/// <summary>
/// Specified the Hub Class Type ...
/// </summary>
/// <value></value>
public Type Hub { get; set; }
}
}
+31
View File
@@ -0,0 +1,31 @@
using System;
using xModels.Base;
using xModels.Dtos;
namespace xPushService.Models {
/// <summary>
/// a Hub Connection ...
/// </summary>
public class XPushConnectionDto : XBaseStorableDto<string> {
/// <summary>
/// Connection Id ...
/// </summary>
/// <value></value>
public override string Id { get; set; }
/// <summary>
/// Connected User Name ...
/// </summary>
/// <value></value>
public string User { get; set; }
/// <summary>
/// Connected User Device ...
/// </summary>
/// <value></value>
public XDeviceDto Device { get; set; }
/// <summary>
/// Connected User's Last Seen ...
/// </summary>
/// <value></value>
public DateTime LastSeen { get; set; }
}
}
+9
View File
@@ -0,0 +1,9 @@
using System.Collections.Generic;
using xModels.Base;
namespace xPushService.Models {
public class XPushGroupDto : XBaseStorableDto<string> {
public override string Id { get; set; }
public List<string> Connections { get; set; }
}
}
+51
View File
@@ -0,0 +1,51 @@
using System;
using xPushService.Constants;
namespace xPushService.Models {
public class XPushMessage {
/// <summary>
/// Specify the Type of Push Notification ...
/// </summary>
/// <value></value>
public XPushType Type { get; set; }
/// <summary>
/// Specify the Topic of PushNotification ...
/// NOTE: XPushTopic enum contains default Values and User can Extends it ...
/// </summary>
/// <value></value>
public int Topic { get; set; }
/// <summary>
/// Specify the Action Name by passing String Values ...
/// NOTE: XPushAction enum contains default Values for Actions ...
/// </summary>
/// <value></value>
public string Action { get; set; }
/// <summary>
/// if this is a User Push Action, we had to pass Actor ...
/// </summary>
/// <value></value>
public string Actor { get; set; }
/// <summary>
/// in CRUD actions or some Custom Actions, we can pass propper data
/// to clients ...
/// </summary>
/// <value></value>
public string Payload { get; set; }
/// <summary>
/// the message or additional Informations for passing to client ...
/// </summary>
/// <value></value>
public string Message { get; set; }
/// <summary>
/// Push notification date and time ...
/// </summary>
/// <value></value>
public DateTime TimeStamp { get; set; }
}
}
+34
View File
@@ -0,0 +1,34 @@
using System;
using xModels.Base;
using xModels.Dtos;
using xPushService.Constants;
namespace xPushService.Models {
public class XWebRTCCalleeDto : XBaseDto {
/// <summary>
/// Callee User Name ...
/// </summary>
/// <value></value>
public string User { get; set; }
/// <summary>
/// Callee Device ...
/// </summary>
/// <value></value>
public XDeviceDto Device { get; set; }
/// <summary>
/// Calee Connection Id ...
/// </summary>
/// <value></value>
public string ConnectionId { get; set; }
/// <summary>
/// call end time ...
/// </summary>
/// <value></value>
public DateTime EndTime { get; set; }
/// <summary>
/// call end reason ...
/// </summary>
/// <value></value>
public XCallEndReason EndReason { get; set; }
}
}
+49
View File
@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using xModels.Base;
using xModels.Dtos;
using xPushService.Constants;
namespace xPushService.Models {
/// <summary>
/// describe a WebRTC Call ...
/// </summary>
public class XWebRTCConnectionDto : XBaseStorableDto<string> {
public override string Id { get; set; }
/// <summary>
/// Call Type ...
/// </summary>
/// <value></value>
public XCallType Type { get; set; }
/// <summary>
/// call request Time ...
/// </summary>
/// <value></value>
public DateTime RequestTime { get; set; }
/// <summary>
/// Payload object ...
/// </summary>
/// <value></value>
public object Payload { get; set; }
/// <summary>
/// Caller User Name ...
/// </summary>
/// <value></value>
public string CallerUser { get; set; }
/// <summary>
/// Caller Device ...
/// </summary>
/// <value></value>
public XDeviceDto CallerDevice { get; set; }
/// <summary>
/// Caller Connection Id ...
/// </summary>
/// <value></value>
public string CallerConnectionId { get; set; }
/// <summary>
/// Callees Informations ...
/// </summary>
/// <value></value>
public IEnumerable<XWebRTCCalleeDto> Callees { get; set; }
}
}
+22
View File
@@ -0,0 +1,22 @@
using System.Collections.Generic;
using xModels.Base;
namespace xPushService.Models {
public class XWebRTCSignalDto : XBaseDto {
/// <summary>
/// Signalign Offer ...
/// </summary>
/// <value></value>
public object Offer { get; set; }
/// <summary>
/// Signaling Answer ...
/// </summary>
/// <value></value>
public object Answer { get; set; }
/// <summary>
/// Signaling Candidates
/// </summary>
/// <value></value>
public IEnumerable<object> Cadidates { get; set; }
}
}