This commit is contained in:
parent
46f5c107b8
commit
fa34ed249b
233 changed files with 4000 additions and 1396 deletions
64
Yavsc/Model/Google/Messaging/GCMRegisterModel.cs
Normal file
64
Yavsc/Model/Google/Messaging/GCMRegisterModel.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
//
|
||||
// GCMRegisterModel.cs
|
||||
//
|
||||
// Author:
|
||||
// paul <>
|
||||
//
|
||||
// Copyright (c) 2015 paul
|
||||
//
|
||||
// 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.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Models.Google.Messaging
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// GCM register model.
|
||||
/// </summary>
|
||||
public class GCMRegisterModel {
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the user.
|
||||
/// </summary>
|
||||
/// <value>The name of the user.</value>
|
||||
[Localizable(true)]
|
||||
[Display(Name="UserName")]
|
||||
[Required(ErrorMessage = "S'il vous plait, entrez un nom d'utilisateur")]
|
||||
public string UserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the password.
|
||||
/// </summary>
|
||||
/// <value>The password.</value>
|
||||
[DisplayName("Mot de passe")]
|
||||
[Required(ErrorMessage = "S'il vous plait, entez un mot de passe")]
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the email.
|
||||
/// </summary>
|
||||
/// <value>The email.</value>
|
||||
[DisplayName("Adresse e-mail")]
|
||||
[Required(ErrorMessage = "S'il vous plait, entrez un e-mail valide")]
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the registration identifier against Google Clood Messaging and their info on this application.
|
||||
/// </summary>
|
||||
/// <value>The registration identifier.</value>
|
||||
public string RegistrationId { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
78
Yavsc/Model/Google/Messaging/MessageWithPayLoad.cs
Normal file
78
Yavsc/Model/Google/Messaging/MessageWithPayLoad.cs
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
//
|
||||
// MessageWithPayLoad.cs
|
||||
//
|
||||
// Author:
|
||||
// paul <>
|
||||
//
|
||||
// Copyright (c) 2015 paul
|
||||
//
|
||||
// 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.Models.Messaging;
|
||||
|
||||
namespace Yavsc.Models.Google.Messaging
|
||||
{
|
||||
// https://gcm-http.googleapis.com/gcm/send
|
||||
/// <summary>
|
||||
/// Message with payload.
|
||||
/// </summary>
|
||||
public class MessageWithPayload<T> {
|
||||
/// <summary>
|
||||
/// To.
|
||||
/// </summary>
|
||||
public string to;
|
||||
/// <summary>
|
||||
/// The registration identifiers.
|
||||
/// </summary>
|
||||
public string [] registration_ids;
|
||||
/// <summary>
|
||||
/// The data.
|
||||
/// </summary>
|
||||
public T data ;
|
||||
/// <summary>
|
||||
/// The notification.
|
||||
/// </summary>
|
||||
public Notification notification;
|
||||
/// <summary>
|
||||
/// The collapse key.
|
||||
/// </summary>
|
||||
public string collapse_key; // in order to collapse ...
|
||||
/// <summary>
|
||||
/// The priority.
|
||||
/// </summary>
|
||||
public int priority; // between 0 and 10, 10 is the lowest!
|
||||
/// <summary>
|
||||
/// The content available.
|
||||
/// </summary>
|
||||
public bool content_available;
|
||||
/// <summary>
|
||||
/// The delay while idle.
|
||||
/// </summary>
|
||||
public bool delay_while_idle;
|
||||
/// <summary>
|
||||
/// The time to live.
|
||||
/// </summary>
|
||||
public int time_to_live; // seconds
|
||||
/// <summary>
|
||||
/// The name of the restricted package.
|
||||
/// </summary>
|
||||
public string restricted_package_name;
|
||||
/// <summary>
|
||||
/// The dry run.
|
||||
/// </summary>
|
||||
public bool dry_run;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
69
Yavsc/Model/Google/Messaging/MessageWithPayloadResponse.cs
Normal file
69
Yavsc/Model/Google/Messaging/MessageWithPayloadResponse.cs
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
//
|
||||
// MessageWithPayloadResponse.cs
|
||||
//
|
||||
// Author:
|
||||
// paul <paul@pschneider.fr>
|
||||
//
|
||||
// Copyright (c) 2015 paul
|
||||
//
|
||||
// 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/>.
|
||||
|
||||
namespace Yavsc.Models.Google.Messaging
|
||||
{
|
||||
// https://gcm-http.googleapis.com/gcm/send
|
||||
|
||||
/// <summary>
|
||||
/// Message with payload response.
|
||||
/// </summary>
|
||||
public class MessageWithPayloadResponse {
|
||||
/// <summary>
|
||||
/// The multicast identifier.
|
||||
/// </summary>
|
||||
public string multicast_id;
|
||||
/// <summary>
|
||||
/// The success count.
|
||||
/// </summary>
|
||||
public int success;
|
||||
/// <summary>
|
||||
/// The failure count.
|
||||
/// </summary>
|
||||
public int failure;
|
||||
/// <summary>
|
||||
/// The canonical identifiers... ?!?
|
||||
/// </summary>
|
||||
public string canonical_ids;
|
||||
/// <summary>
|
||||
/// Detailled result.
|
||||
/// </summary>
|
||||
public class Result {
|
||||
/// <summary>
|
||||
/// The message identifier.
|
||||
/// </summary>
|
||||
public string message_id;
|
||||
/// <summary>
|
||||
/// The registration identifier.
|
||||
/// </summary>
|
||||
public string registration_id;
|
||||
/// <summary>
|
||||
/// The error.
|
||||
/// </summary>
|
||||
public string error;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The results.
|
||||
/// </summary>
|
||||
public Result [] results;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue