Completes the last commit,

that included a GCM move to the data Model,
there was a cut, here is the past.

Adds the generated code for the 'fr' localized resources.
This commit is contained in:
Paul Schneider
2015-06-05 14:49:31 +02:00
parent eb5263078f
commit 624c29d5db
4 changed files with 549 additions and 0 deletions

View File

@ -0,0 +1,97 @@
//
// 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 System;
using System.Web.Mvc;
namespace Yavsc.Model.Google
{
// 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;
/// <summary>
/// Validate the specified modelState.
/// </summary>
/// <param name="modelState">Model state.</param>
public void Validate(ModelStateDictionary modelState) {
if (to==null && registration_ids == null) {
modelState.AddModelError ("to", "One of \"to\" or \"registration_ids\" parameters must be specified");
modelState.AddModelError ("registration_ids", "*");
}
if (notification == null && data == null) {
modelState.AddModelError ("notification", "At least one of \"notification\" or \"data\" parameters must be specified");
modelState.AddModelError ("data", "*");
}
if (notification != null) {
if (notification.icon == null)
modelState.AddModelError ("notification.icon", "please, specify an icon resoure name");
if (notification.title == null)
modelState.AddModelError ("notification.title", "please, specify a title");
}
}
}
}

View File

@ -0,0 +1,71 @@
//
// 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/>.
using System;
namespace Yavsc.Model.Google
{
// https://gcm-http.googleapis.com/gcm/send
/// <summary>
/// Message with payload response.
/// </summary>
public class MessageWithPayloadResponse {
/// <summary>
/// The multicast identifier.
/// </summary>
public int multicast_id;
/// <summary>
/// The success count.
/// </summary>
public int success;
/// <summary>
/// The failure count.
/// </summary>
public int failure;
/// <summary>
/// The canonical identifiers... ?!?
/// </summary>
public int 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;
}
}

View File

@ -0,0 +1,62 @@
//
// Notification.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;
namespace Yavsc.Model.Google
{
/// <summary>
/// Notification.
/// </summary>
public class Notification {
/// <summary>
/// The title.
/// </summary>
public string title;
/// <summary>
/// The body.
/// </summary>
public string body;
/// <summary>
/// The icon.
/// </summary>
public string icon;
/// <summary>
/// The sound.
/// </summary>
public string sound;
/// <summary>
/// The tag.
/// </summary>
public string tag;
/// <summary>
/// The color.
/// </summary>
public string color;
/// <summary>
/// The click action.
/// </summary>
public string click_action;
}
// https://gcm-http.googleapis.com/gcm/send
}

319
yavscModel/LocalizedText.fr.Designer.cs generated Normal file
View File

@ -0,0 +1,319 @@
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 4.0.30319.17020
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
namespace Yavsc.Model {
using System;
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class LocalizedText_fr {
private static System.Resources.ResourceManager resourceMan;
private static System.Globalization.CultureInfo resourceCulture;
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal LocalizedText_fr() {
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
public static System.Resources.ResourceManager ResourceManager {
get {
if (object.Equals(null, resourceMan)) {
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Yavsc.Model.LocalizedText_fr", typeof(LocalizedText_fr).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
public static System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
public static string Tex_version {
get {
return ResourceManager.GetString("Tex_version", resourceCulture);
}
}
public static string Message_sent {
get {
return ResourceManager.GetString("Message_sent", resourceCulture);
}
}
public static string Count {
get {
return ResourceManager.GetString("Count", resourceCulture);
}
}
public static string was_added_to_the_role {
get {
return ResourceManager.GetString("was_added_to_the_role", resourceCulture);
}
}
public static string Description {
get {
return ResourceManager.GetString("Description", resourceCulture);
}
}
public static string was_added_to_the_empty_role {
get {
return ResourceManager.GetString("was_added_to_the_empty_role", resourceCulture);
}
}
public static string My_Estimates {
get {
return ResourceManager.GetString("My_Estimates", resourceCulture);
}
}
public static string Google_error {
get {
return ResourceManager.GetString("Google_error", resourceCulture);
}
}
public static string StartDate {
get {
return ResourceManager.GetString("StartDate", resourceCulture);
}
}
public static string DocTemplateException {
get {
return ResourceManager.GetString("DocTemplateException", resourceCulture);
}
}
public static string Ciffer {
get {
return ResourceManager.GetString("Ciffer", resourceCulture);
}
}
public static string Title {
get {
return ResourceManager.GetString("Title", resourceCulture);
}
}
public static string MaxDate {
get {
return ResourceManager.GetString("MaxDate", resourceCulture);
}
}
public static string younotadmin {
get {
return ResourceManager.GetString("younotadmin", resourceCulture);
}
}
public static string ProviderName {
get {
return ResourceManager.GetString("ProviderName", resourceCulture);
}
}
public static string Date_search {
get {
return ResourceManager.GetString("Date_search", resourceCulture);
}
}
public static string User_name {
get {
return ResourceManager.GetString("User_name", resourceCulture);
}
}
public static string Preview {
get {
return ResourceManager.GetString("Preview", resourceCulture);
}
}
public static string Register {
get {
return ResourceManager.GetString("Register", resourceCulture);
}
}
public static string access_denied {
get {
return ResourceManager.GetString("access_denied", resourceCulture);
}
}
public static string Welcome {
get {
return ResourceManager.GetString("Welcome", resourceCulture);
}
}
public static string Product_reference {
get {
return ResourceManager.GetString("Product_reference", resourceCulture);
}
}
public static string EndDate {
get {
return ResourceManager.GetString("EndDate", resourceCulture);
}
}
public static string Google_calendar {
get {
return ResourceManager.GetString("Google_calendar", resourceCulture);
}
}
public static string UserName {
get {
return ResourceManager.GetString("UserName", resourceCulture);
}
}
public static string Remember_me {
get {
return ResourceManager.GetString("Remember_me", resourceCulture);
}
}
public static string ImgLocator {
get {
return ResourceManager.GetString("ImgLocator", resourceCulture);
}
}
public static string Home {
get {
return ResourceManager.GetString("Home", resourceCulture);
}
}
public static string Pdf_version {
get {
return ResourceManager.GetString("Pdf_version", resourceCulture);
}
}
public static string Unitary_cost {
get {
return ResourceManager.GetString("Unitary_cost", resourceCulture);
}
}
public static string Circles {
get {
return ResourceManager.GetString("Circles", resourceCulture);
}
}
public static string Location {
get {
return ResourceManager.GetString("Location", resourceCulture);
}
}
public static string Remove {
get {
return ResourceManager.GetString("Remove", resourceCulture);
}
}
public static string Estimate_not_found {
get {
return ResourceManager.GetString("Estimate_not_found", resourceCulture);
}
}
public static string ProviderId {
get {
return ResourceManager.GetString("ProviderId", resourceCulture);
}
}
public static string Online {
get {
return ResourceManager.GetString("Online", resourceCulture);
}
}
public static string Not_Approuved {
get {
return ResourceManager.GetString("Not Approuved", resourceCulture);
}
}
public static string Offline {
get {
return ResourceManager.GetString("Offline", resourceCulture);
}
}
public static string MinDate {
get {
return ResourceManager.GetString("MinDate", resourceCulture);
}
}
public static string Comment {
get {
return ResourceManager.GetString("Comment", resourceCulture);
}
}
public static string role_created {
get {
return ResourceManager.GetString("role_created", resourceCulture);
}
}
public static string User_List {
get {
return ResourceManager.GetString("User List", resourceCulture);
}
}
public static string EventWebPage {
get {
return ResourceManager.GetString("EventWebPage", resourceCulture);
}
}
public static string Item_added_to_basket {
get {
return ResourceManager.GetString("Item_added_to_basket", resourceCulture);
}
}
public static string Consultant {
get {
return ResourceManager.GetString("Consultant", resourceCulture);
}
}
}
}