Project

General

Profile

skeleton.patch

Marian Edu, 05/01/2020 10:05 AM

Download (14.3 KB)

View differences:

oo4gl/OpenEdge/Core/HashAlgorithmEnum.cls
1
// TODO: this is an enum, fix when FWD supports it
2
class OpenEdge.Core.HashAlgorithmEnum
3
inherits Progress.Lang.Enum:
4
  
5
  define public static property MD5       as OpenEdge.Core.HashAlgorithmEnum get.
6
  define public static property SHA-1     as OpenEdge.Core.HashAlgorithmEnum get.
7
  define public static property SHA-256   as OpenEdge.Core.HashAlgorithmEnum get.
8
  define public static property SHA-512   as OpenEdge.Core.HashAlgorithmEnum get.
9
  
10
   /* this is mocked here but in the 4GL it is implicitly added to the child enum class */
11
   /* and the type is coded to that enum */
12
   method static public OpenEdge.Core.HashAlgorithmEnum GetEnum(input name as char):
13
   end method.
14
   
15
   /* this is mocked here but in the 4GL it is implicitly added to the child enum class */
16
   /* and the type is coded to that enum */
17
   method static public OpenEdge.Core.HashAlgorithmEnum GetEnum(input val as int64):
18
   end method.
19
  
20
end.
1
enum OpenEdge.Core.HashAlgorithmEnum: 
2
    define enum       
3
        MD5     =  0
4
        SHA-1
5
        SHA-256
6
        SHA-512
7
        .
8
end enum.
oo4gl/OpenEdge/Core/ServerConnection/FormatMaskEnum.cls
1
// TODO: make this a real enum
2
class OpenEdge.Core.ServerConnection.FormatMaskEnum:
3
  define public static property Default as integer get.
4

  
5
  define public static property None as integer get.
6

  
7
  define public static property DashSpace as integer get.
8

  
9
  define public static property ABLConnect as integer get.
10

  
11
  define public static property DoubleDashSpace as integer get.
12

  
13
  define public static property DoubleDashEquals as integer get.
14

  
15
  define public static property NameEquals as integer get.
16

  
17
  define public static property Custom as integer get.
18
end.
1
enum OpenEdge.Core.ServerConnection.FormatMaskEnum:
2
    define enum       
3
        None 
4
        DashSpace
5
        DoubleDashEquals
6
        DoubleDashSpace
7
        NameEquals
8
        Custom
9
        ABLConnect = DashSpace
10
        Default = ABLConnect. 
11
end enum.
oo4gl/OpenEdge/Logging/LogLevelEnum.cls
1
// TODO: replace with ENUM once FWD supports it
2
class OpenEdge.Logging.LogLevelEnum:
3
  // TODO: add the enum properties
4
end.
1
enum OpenEdge.Logging.LogLevelEnum:
2
    define enum
3
        OFF = 0 
4
        FATAL
5
        ERROR
6
        WARN   
7
        INFO
8
        DEBUG
9
        TRACE
10
        DEFAULT = WARN
11
        .
12
end enum.
oo4gl/OpenEdge/Net/HTTP/StatusCodeEnum.cls
1
// TODO: this is an enum - switch to enum when FWD supports it
2
class OpenEdge.Net.HTTP.StatusCodeEnum:
3
  // TODO: add enum properties
4
  define public static property OK as integer get.
5
  define public static property BadRequest as integer get.
6
  define public static property Forbidden as integer get.
7
  define public static property NotFound as integer get.
8
  define public static property Unauthorized as integer get.
9
end.
1
enum OpenEdge.Net.HTTP.StatusCodeEnum:
2
    define enum         /* out-of bounds-handling */
3
                        None                          =  0
4
                        Unknown                       = -1
5
                            
6
                            /* 1xx: Informational - Request received, continuing process */
7
                        Continue                      = 100
8
                        SwitchingProtocols            = 101
9
                        Processing                    = 102
10
                        /* 103-199     Unassigned */
11
                            
12
                            /* 2xx: Success - The action was successfully received, understood, and accepted */
13
                        OK                            = 200
14
                        Created                       = 201
15
                        Accepted                      = 202
16
                        NonAuthoritativeInformation   = 203
17
                        NoContent                     = 204
18
                        ResetContent                  = 205
19
                        PartialContent                = 206
20
                        Multi-Status                  = 207
21
                        AlreadyReported               = 208
22
                        /* 209-225  Unassigned */     
23
                        IMUsed                        = 226
24
                            
25
                            /* 3xx: Redirection - Further action must be taken in order to complete the request */
26
                        MultipleChoices               = 300
27
                        MovedPermanently              = 301
28
                        Found                         = 302
29
                        SeeOther                      = 303
30
                        NotModified                   = 304
31
                        UseProxy                      = 305
32
                        /* 306 Unused */
33
                        TemporaryRedirect             = 307
34
                        PermanentRedirect             = 308
35
                        /* 309-399  Unassigned */
36
                            
37
                            /* 4xx: Client Error - The request contains bad syntax or cannot be fulfilled */
38
                        BadRequest                    = 400
39
                        Unauthorized                  = 401
40
                        PaymentRequired               = 402
41
                        Forbidden                     = 403
42
                        NotFound                      = 404
43
                        MethodNotAllowed              = 405
44
                        NotAcceptable                 = 406                                                                   
45
                        ProxyAuthenticationRequired   = 407
46
                        RequestTimeOut                = 408
47
                        Conflict                      = 409
48
                        Gone                          = 410
49
                        LengthRequired                = 411
50
                        PreconditionFailed            = 412
51
                        RequestEntityTooLarge         = 413
52
                        RequestURITooLarge            = 414
53
                        UnsupportedMediaType          = 415
54
                        RequestedRangeNotSatisfiable  = 416
55
                        ExpectationFailed             = 417
56
                        /* 418-420  Unassigned */
57
                        MisdirectedRequest            = 421
58
                        UnprocessableEntity           = 422
59
                        Locked                        = 423
60
                        FailedDependency              = 424
61
                        /* 425 Unassigned */
62
                        UpgradeRequired               = 426
63
                        /*427 Unassigned */
64
                        PreconditionRequired          = 428
65
                        TooManyRequests               = 429
66
                        /* 430 Unassigned */
67
                        RequestHeaderFieldsTooLarge   = 431
68
                        /* 432-499     Unassigned */
69
                        
70
                            
71
                            /* 5xx: Server Error - The server failed to fulfill an apparently valid request */
72
                        InternalServerError           = 500
73
                        NotImplemented                = 501
74
                        BadGateway                    = 502
75
                        ServiceUnavailable            = 503
76
                        GatewayTimeout                = 504
77
                        HTTPVersionNotSupported       = 505
78
                        VariantAlsoNegotiates         = 506
79
                        InsufficientStorage           = 507
80
                        LoopDetected                  = 508
81
                        /* 509 Unassigned */
82
                        NotExtended                   = 510
83
                        NetworkAuthenticationRequired = 511
84
                        /* 512-599     Unassigned */
85
                        .
86
end enum.
oo4gl/OpenEdge/Net/HTTP/TransferEncodingEnum.cls
1 1
enum OpenEdge.Net.HTTP.TransferEncodingEnum:
2

  
3
   // Add enumerations as referenced
4
   def enum.
5

  
2
    define enum       None      = 0
3
                      Chunked
4
                      Identity
5
                      Gzip
6
                      X-Gzip = Gzip
7
                      Compress
8
                      Deflate
9
                      .
6 10
end enum.
oo4gl/OpenEdge/Net/UriEncodingTypeEnum.cls
1
// TODO: convert to enum when FWD supports it
2
class OpenEdge.Net.UriEncodingTypeEnum
3
inherits Progress.Lang.Enum:
4
  // TODO: add members here, as you find them
5
  
6
  define public static property Query as OpenEdge.Net.UriEncodingTypeEnum get.
7
  define public static property Default as OpenEdge.Net.UriEncodingTypeEnum get.
8
  define public static property Scheme   as OpenEdge.Net.UriEncodingTypeEnum get.
9
  define public static property Host     as OpenEdge.Net.UriEncodingTypeEnum get.
10
  define public static property Path     as OpenEdge.Net.UriEncodingTypeEnum get.
11
  define public static property Fragment as OpenEdge.Net.UriEncodingTypeEnum get.
12
  define public static property Cookie   as OpenEdge.Net.UriEncodingTypeEnum get.
13
  
14
  method static public OpenEdge.Net.UriEncodingTypeEnum GetEnum(input name as char):
15
  end method.
16
   
17
  method static public OpenEdge.Net.UriEncodingTypeEnum GetEnum(input val as int64):
18
  end method.
19
   
20
end.
1
enum OpenEdge.Net.UriEncodingTypeEnum:
2
    define enum Default = 0
3
                Scheme
4
                Host
5
                Path
6
                Query
7
                Fragment
8
                Cookie
9
                .
10
end enum.
oo4gl/OpenEdge/Net/UriSchemeEnum.cls
1
// TODO: convert to enum when FWD supports it
2
class OpenEdge.Net.UriSchemeEnum
3
inherits Progress.Lang.Enum:
4
  // TODO: add members here, as you find them
5
  
6
  define public static property http as OpenEdge.Net.UriSchemeEnum get.
7
  define public static property https as OpenEdge.Net.UriSchemeEnum get.
8
  define public static property file   as OpenEdge.Net.UriSchemeEnum get.
9
  define public static property ftp     as OpenEdge.Net.UriSchemeEnum get.
10
  
11
  method static public OpenEdge.Net.UriSchemeEnum GetEnum(input name as char):
12
  end method.
13
   
14
  method static public OpenEdge.Net.UriSchemeEnum GetEnum(input val as int64):
15
  end method.
16
   
17
end.
1
enum OpenEdge.Net.UriSchemeEnum:
2
    define enum       http  =  0
3
                      https
4
                      file
5
                      ftp.
6
end enum.
oo4gl/Progress/Reflect/AccessMode.cls
1 1

  
2
class Progress.Reflect.AccessMode
3
inherits Progress.Lang.Enum:
2
enum Progress.Reflect.AccessMode:
4 3

  
5
   def public property Public as Progress.Reflect.AccessMode get.
6
   def public property Protected as Progress.Reflect.AccessMode get.
7
   def public property Private as Progress.Reflect.AccessMode get.
8

  
9
   /* this is mocked here but in the 4GL it is implicitly added to the child enum class */
10
   /* and the type is coded to that enum */
11
   method static public Progress.Reflect.AccessMode GetEnum(input name as char):
12
   end method.
4
    define enum
5
        Public
6
        Protected
7
        Private.
13 8
   
14
   /* this is mocked here but in the 4GL it is implicitly added to the child enum class */
15
   /* and the type is coded to that enum */
16
   method static public Progress.Reflect.AccessMode GetEnum(input val as int64):
17
   end method.
18
end class.
9
end enum.
oo4gl/Progress/Reflect/Flags.cls
1
enum Progress.Reflect.Flags flags:
1 2

  
2
class Progress.Reflect.Flags
3
   inherits Progress.Lang.FlagsEnum:
3
    define enum
4
        Public = 1
5
        Protected
6
        Private
7
        Static
8
        Instance
9
        DeclaredOnly.
4 10
   
5
   define public static property Public         as Progress.Reflect.Flags get.
6
   define public static property Protected      as Progress.Reflect.Flags get.
7
   define public static property Private        as Progress.Reflect.Flags get.
8
   define public static property Static         as Progress.Reflect.Flags get.
9
   define public static property Instance       as Progress.Reflect.Flags get.
10
   define public static property DeclaredOnly   as Progress.Reflect.Flags get.
11

  
12
   /* this is mocked here but in the 4GL it is implicitly added to the child enum class */
13
   /* and the type is coded to that enum */
14
   method static public Progress.Reflect.Flags GetEnum(input name as char):
15
   end method.
16
   
17
   /* this is mocked here but in the 4GL it is implicitly added to the child enum class */
18
   /* and the type is coded to that enum */
19
   method static public Progress.Reflect.Flags GetEnum(input val as int64):
20
   end method.
21
end class.
11
end enum.