diff --git a/web/ApiControllers/Calendar/Model/UserPrefs.cs b/web/ApiControllers/Calendar/Model/UserPrefs.cs deleted file mode 100644 index 48e5fe3c..00000000 --- a/web/ApiControllers/Calendar/Model/UserPrefs.cs +++ /dev/null @@ -1,34 +0,0 @@ -// -// UserPrefs.cs -// -// Author: -// Paul Schneider -// -// 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 . -using System; -using System.Web.Http; -using System.ComponentModel.DataAnnotations; -using System.Collections.Generic; - -namespace Yavsc.ApiControllers.Calendar.Model -{ - class UserPrefs - { - Circle [] Circles { get; set ; } - Dictionary EventTypeRatings { get; set; } - Dictionary LocationTypeRatings { get; set; } - } -} diff --git a/web/ApiControllers/Calendar/CalendarController.cs b/web/ApiControllers/CalendarController.cs similarity index 80% rename from web/ApiControllers/Calendar/CalendarController.cs rename to web/ApiControllers/CalendarController.cs index 2ad7eed2..f30e168c 100644 --- a/web/ApiControllers/Calendar/CalendarController.cs +++ b/web/ApiControllers/CalendarController.cs @@ -20,17 +20,15 @@ // along with this program. If not, see . using System; using System.Web.Http; -using System.ComponentModel.DataAnnotations; using Yavsc.ApiControllers.Calendar.Model; -using Yavsc.Helpers; -using System.ComponentModel; -using Yavsc.Model; +using Yavsc.Model.RolesAndMembers; using System.Web.Security; -using System.Web.Profile; -using System.Web.Http.ModelBinding; using Yavsc.Model.Google; +using Yavsc.Helpers; +using System.Web.Profile; -namespace Yavsc.ApiControllers.Calendar + +namespace Yavsc.ApiControllers { /// /// Night flash controller. @@ -139,42 +137,7 @@ namespace Yavsc.ApiControllers.Calendar - /// - /// GCM register model. - /// - public class GCMRegisterModel { - /// - /// Gets or sets the name of the user. - /// - /// The name of the user. - [Localizable(true)] - [Display(ResourceType=typeof(LocalizedText),Name="UserName")] - [Required(ErrorMessage = "S'il vous plait, entrez un nom d'utilisateur")] - public string UserName { get; set; } - /// - /// Gets or sets the password. - /// - /// The password. - [DisplayName("Mot de passe")] - [Required(ErrorMessage = "S'il vous plait, entez un mot de passe")] - public string Password { get; set; } - - /// - /// Gets or sets the email. - /// - /// The email. - [DisplayName("Adresse e-mail")] - [Required(ErrorMessage = "S'il vous plait, entrez un e-mail valide")] - public string Email { get; set; } - - /// - /// Gets or sets the registration identifier against Google Clood Messaging and their info on this application. - /// - /// The registration identifier. - public string RegistrationId { get; set; } - - } /// /// Registers with push notifications enabled. diff --git a/web/Web.csproj b/web/Web.csproj index a3433ba8..181e94cf 100644 --- a/web/Web.csproj +++ b/web/Web.csproj @@ -123,8 +123,6 @@ - - @@ -181,22 +179,8 @@ - - - - - - - - - - - - - - - + diff --git a/web/ApiControllers/Calendar/Model/EventPub.cs b/yavscModel/Calendar/EventPub.cs similarity index 97% rename from web/ApiControllers/Calendar/Model/EventPub.cs rename to yavscModel/Calendar/EventPub.cs index ecd3eab6..b3bebdfd 100644 --- a/web/ApiControllers/Calendar/Model/EventPub.cs +++ b/yavscModel/Calendar/EventPub.cs @@ -23,6 +23,7 @@ using System.Web.Http; using System.ComponentModel.DataAnnotations; using Yavsc.ApiControllers.Calendar.Model; using Yavsc.Model; +using Yavsc.Model.RolesAndMembers; namespace Yavsc.ApiControllers.Calendar.Model { diff --git a/web/ApiControllers/Calendar/Model/OpenDay.cs b/yavscModel/Calendar/OpenDay.cs similarity index 100% rename from web/ApiControllers/Calendar/Model/OpenDay.cs rename to yavscModel/Calendar/OpenDay.cs diff --git a/web/ApiControllers/Calendar/Model/Period.cs b/yavscModel/Calendar/Period.cs similarity index 100% rename from web/ApiControllers/Calendar/Model/Period.cs rename to yavscModel/Calendar/Period.cs diff --git a/web/ApiControllers/Calendar/Model/Periodicity.cs b/yavscModel/Calendar/Periodicity.cs similarity index 100% rename from web/ApiControllers/Calendar/Model/Periodicity.cs rename to yavscModel/Calendar/Periodicity.cs diff --git a/web/ApiControllers/Calendar/Model/Position.cs b/yavscModel/Calendar/Position.cs similarity index 100% rename from web/ApiControllers/Calendar/Model/Position.cs rename to yavscModel/Calendar/Position.cs diff --git a/web/ApiControllers/Calendar/Model/PositionAndKeyphrase.cs b/yavscModel/Calendar/PositionAndKeyphrase.cs similarity index 100% rename from web/ApiControllers/Calendar/Model/PositionAndKeyphrase.cs rename to yavscModel/Calendar/PositionAndKeyphrase.cs diff --git a/web/ApiControllers/Calendar/Model/ProvidedEvent.cs b/yavscModel/Calendar/ProvidedEvent.cs similarity index 97% rename from web/ApiControllers/Calendar/Model/ProvidedEvent.cs rename to yavscModel/Calendar/ProvidedEvent.cs index 550a5d4d..74324bf3 100644 --- a/web/ApiControllers/Calendar/Model/ProvidedEvent.cs +++ b/yavscModel/Calendar/ProvidedEvent.cs @@ -22,6 +22,7 @@ using System; using System.Web.Http; using System.ComponentModel.DataAnnotations; +using Yavsc.Model.RolesAndMembers; namespace Yavsc.ApiControllers.Calendar.Model { diff --git a/web/ApiControllers/Calendar/Model/Schedule.cs b/yavscModel/Calendar/Schedule.cs similarity index 100% rename from web/ApiControllers/Calendar/Model/Schedule.cs rename to yavscModel/Calendar/Schedule.cs diff --git a/web/ApiControllers/Calendar/Model/WeekDay.cs b/yavscModel/Calendar/WeekDay.cs similarity index 100% rename from web/ApiControllers/Calendar/Model/WeekDay.cs rename to yavscModel/Calendar/WeekDay.cs diff --git a/web/ApiControllers/Calendar/Model/YaEvent.cs b/yavscModel/Calendar/YaEvent.cs similarity index 100% rename from web/ApiControllers/Calendar/Model/YaEvent.cs rename to yavscModel/Calendar/YaEvent.cs diff --git a/yavscModel/Google/GCMRegisterModel.cs b/yavscModel/Google/GCMRegisterModel.cs new file mode 100644 index 00000000..03299c88 --- /dev/null +++ b/yavscModel/Google/GCMRegisterModel.cs @@ -0,0 +1,65 @@ +// +// 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 . + +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace Yavsc.Model.Google +{ + + /// + /// GCM register model. + /// + public class GCMRegisterModel { + /// + /// Gets or sets the name of the user. + /// + /// The name of the user. + [Localizable(true)] + [Display(ResourceType=typeof(LocalizedText),Name="UserName")] + [Required(ErrorMessage = "S'il vous plait, entrez un nom d'utilisateur")] + public string UserName { get; set; } + + /// + /// Gets or sets the password. + /// + /// The password. + [DisplayName("Mot de passe")] + [Required(ErrorMessage = "S'il vous plait, entez un mot de passe")] + public string Password { get; set; } + + /// + /// Gets or sets the email. + /// + /// The email. + [DisplayName("Adresse e-mail")] + [Required(ErrorMessage = "S'il vous plait, entrez un e-mail valide")] + public string Email { get; set; } + + /// + /// Gets or sets the registration identifier against Google Clood Messaging and their info on this application. + /// + /// The registration identifier. + public string RegistrationId { get; set; } + + } +} diff --git a/web/ApiControllers/Calendar/Model/Circle.cs b/yavscModel/RolesAndMemebers/Circle.cs similarity index 97% rename from web/ApiControllers/Calendar/Model/Circle.cs rename to yavscModel/RolesAndMemebers/Circle.cs index 71a7c5fa..cfd05eff 100644 --- a/web/ApiControllers/Calendar/Model/Circle.cs +++ b/yavscModel/RolesAndMemebers/Circle.cs @@ -23,7 +23,7 @@ using System.Web.Http; using System.ComponentModel.DataAnnotations; using System.Collections.Generic; -namespace Yavsc.ApiControllers.Calendar.Model +namespace Yavsc.Model.RolesAndMembers { /// /// Circle. diff --git a/web/ApiControllers/Calendar/Model/ProviderPublicInfo.cs b/yavscModel/RolesAndMemebers/ProviderPublicInfo.cs similarity index 96% rename from web/ApiControllers/Calendar/Model/ProviderPublicInfo.cs rename to yavscModel/RolesAndMemebers/ProviderPublicInfo.cs index 6a1503ef..f4495dee 100644 --- a/web/ApiControllers/Calendar/Model/ProviderPublicInfo.cs +++ b/yavscModel/RolesAndMemebers/ProviderPublicInfo.cs @@ -22,8 +22,9 @@ using System; using System.Web.Http; using System.ComponentModel.DataAnnotations; +using Yavsc.ApiControllers.Calendar.Model; -namespace Yavsc.ApiControllers.Calendar.Model +namespace Yavsc.Model.RolesAndMembers { /// /// Provider public info. diff --git a/web/ApiControllers/Calendar/Model/Publishing.cs b/yavscModel/RolesAndMemebers/Publishing.cs similarity index 95% rename from web/ApiControllers/Calendar/Model/Publishing.cs rename to yavscModel/RolesAndMemebers/Publishing.cs index e4ffbd4a..f41cb330 100644 --- a/web/ApiControllers/Calendar/Model/Publishing.cs +++ b/yavscModel/RolesAndMemebers/Publishing.cs @@ -23,7 +23,7 @@ using System; using System.Web.Http; using System.ComponentModel.DataAnnotations; -namespace Yavsc.ApiControllers.Calendar.Model +namespace Yavsc.Model.RolesAndMembers { /// diff --git a/yavscModel/YavscModel.csproj b/yavscModel/YavscModel.csproj index 844b863d..9462b50a 100644 --- a/yavscModel/YavscModel.csproj +++ b/yavscModel/YavscModel.csproj @@ -147,6 +147,20 @@ + + + + + + + + + + + + + +