aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Native/Tango.Emulations.Native/PMR/Connection/KeepAliveRequest.pb-c.h
blob: 379aa6caaba0e4225cf266847f6521c6712084ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
/* Generated from: KeepAliveRequest.proto */

#ifndef PROTOBUF_C_KeepAliveRequest_2eproto__INCLUDED
#define PROTOBUF_C_KeepAliveRequest_2eproto__INCLUDED

#include <protobuf-c/protobuf-c.h>

PROTOBUF_C__BEGIN_DECLS

#if PROTOBUF_C_VERSION_NUMBER < 1003000
# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION
# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
#endif


typedef struct _KeepAliveRequest KeepAliveRequest;


/* --- enums --- */


/* --- messages --- */

struct  _KeepAliveRequest
{
  ProtobufCMessage base;
};
#define KEEP_ALIVE_REQUEST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&keep_alive_request__descriptor) \
     }


/* KeepAliveRequest methods */
void   keep_alive_request__init
                     (KeepAliveRequest         *message);
size_t keep_alive_request__get_packed_size
                     (const KeepAliveRequest   *message);
size_t keep_alive_request__pack
                     (const KeepAliveRequest   *message,
                      uint8_t             *out);
size_t keep_alive_request__pack_to_buffer
                     (const KeepAliveRequest   *message,
                      ProtobufCBuffer     *buffer);
KeepAliveRequest *
       keep_alive_request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   keep_alive_request__free_unpacked
                     (KeepAliveRequest *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*KeepAliveRequest_Closure)
                 (const KeepAliveRequest *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCMessageDescriptor keep_alive_request__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_KeepAliveRequest_2eproto__INCLUDED */
w"> public List<Role> Roles { get { return UsersRoles.Select(x => x.Role).ToList(); } } /// <summary> /// Gets the aggregated user permissions as enumerations. /// </summary> [NotMapped] public List<Permission> Permissions { get { return UsersRoles.Select(x => x.Role).ToList().SelectMany(x => x.RolesPermissions).Select(x => x.Permission).ToList(); } } private String _passwordGateway; /// <summary> /// Gets or sets the password gate way. /// </summary> [NotMapped] [JsonIgnore] [XmlIgnore] public String PasswordGateWay { get { return _passwordGateway; } set { _passwordGateway = value; Password = GetHashGenerator().Encrypt(_passwordGateway); RaisePropertyChangedAuto(); _passwordGatewayModified = true; } } protected override void RaisePropertyChanged(string propName) { base.RaisePropertyChanged(propName); if (propName == nameof(Password)) { RaisePropertyChanged(nameof(PasswordGateWay)); } } public override bool Validate(ObservablesContext context) { return base.Validate(context) && Contact.Validate(context) && Address.Validate(context); } protected override void OnValidating(ObservablesContext context) { base.OnValidating(context); var users = context.Users.ToList(); if (users.Exists(x => x.Guid != Guid && x.Email.ToLower() == Email.ToLower())) { InsertError(nameof(Email), "The specified email is already taken by another account."); } if (!Email.IsEmail()) { InsertError(nameof(Email), "The specified email address is invalid."); } if (_passwordGatewayModified) { if (!PasswordGateWay.IsBetweenLength(4, 30)) { InsertError(nameof(PasswordGateWay), "A user password must be at least 4 characters long and maximum 30."); } } } /// <summary> /// Gets the specified password hash. /// </summary> /// <param name="password">The password.</param> /// <returns></returns> public static String GetPasswordHash(String password) { return GetHashGenerator().Encrypt(password); } private static IHashGenerator GetHashGenerator() { if (_hashGenerator == null) { _hashGenerator = new BasicHashGenerator(); } return _hashGenerator; } } }