log4ever 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -1
- data/Gemfile +2 -1
- data/Gemfile.lock +7 -1
- data/README.md +3 -1
- data/lib/log4r/evernote.rb +10 -24
- data/lib/log4r/outputter/evernoteoutputter.rb +3 -11
- data/log4ever.gemspec +2 -1
- data/spec/log4ever_spec.rb +24 -17
- metadata +40 -58
- data/.project +0 -11
- data/lib/log4r/evernote/lib/Evernote/EDAM/errors_constants.rb +0 -14
- data/lib/log4r/evernote/lib/Evernote/EDAM/errors_types.rb +0 -128
- data/lib/log4r/evernote/lib/Evernote/EDAM/limits_constants.rb +0 -240
- data/lib/log4r/evernote/lib/Evernote/EDAM/limits_types.rb +0 -13
- data/lib/log4r/evernote/lib/Evernote/EDAM/note_store.rb +0 -5487
- data/lib/log4r/evernote/lib/Evernote/EDAM/note_store_constants.rb +0 -14
- data/lib/log4r/evernote/lib/Evernote/EDAM/note_store_types.rb +0 -1012
- data/lib/log4r/evernote/lib/Evernote/EDAM/types_constants.rb +0 -20
- data/lib/log4r/evernote/lib/Evernote/EDAM/types_types.rb +0 -1792
- data/lib/log4r/evernote/lib/Evernote/EDAM/user_store.rb +0 -549
- data/lib/log4r/evernote/lib/Evernote/EDAM/user_store_constants.rb +0 -18
- data/lib/log4r/evernote/lib/Evernote/EDAM/user_store_types.rb +0 -415
- data/lib/log4r/evernote/lib/thrift/client.rb +0 -62
- data/lib/log4r/evernote/lib/thrift/core_ext/fixnum.rb +0 -29
- data/lib/log4r/evernote/lib/thrift/core_ext.rb +0 -23
- data/lib/log4r/evernote/lib/thrift/exceptions.rb +0 -84
- data/lib/log4r/evernote/lib/thrift/processor.rb +0 -57
- data/lib/log4r/evernote/lib/thrift/protocol/base_protocol.rb +0 -290
- data/lib/log4r/evernote/lib/thrift/protocol/binary_protocol.rb +0 -229
- data/lib/log4r/evernote/lib/thrift/protocol/binary_protocol_accelerated.rb +0 -39
- data/lib/log4r/evernote/lib/thrift/protocol/compact_protocol.rb +0 -426
- data/lib/log4r/evernote/lib/thrift/serializer/deserializer.rb +0 -33
- data/lib/log4r/evernote/lib/thrift/serializer/serializer.rb +0 -34
- data/lib/log4r/evernote/lib/thrift/server/base_server.rb +0 -31
- data/lib/log4r/evernote/lib/thrift/server/mongrel_http_server.rb +0 -58
- data/lib/log4r/evernote/lib/thrift/server/nonblocking_server.rb +0 -305
- data/lib/log4r/evernote/lib/thrift/server/simple_server.rb +0 -43
- data/lib/log4r/evernote/lib/thrift/server/thread_pool_server.rb +0 -75
- data/lib/log4r/evernote/lib/thrift/server/threaded_server.rb +0 -47
- data/lib/log4r/evernote/lib/thrift/struct.rb +0 -237
- data/lib/log4r/evernote/lib/thrift/struct_union.rb +0 -192
- data/lib/log4r/evernote/lib/thrift/thrift_native.rb +0 -24
- data/lib/log4r/evernote/lib/thrift/transport/base_server_transport.rb +0 -37
- data/lib/log4r/evernote/lib/thrift/transport/base_transport.rb +0 -107
- data/lib/log4r/evernote/lib/thrift/transport/buffered_transport.rb +0 -108
- data/lib/log4r/evernote/lib/thrift/transport/framed_transport.rb +0 -116
- data/lib/log4r/evernote/lib/thrift/transport/http_client_transport.rb +0 -53
- data/lib/log4r/evernote/lib/thrift/transport/io_stream_transport.rb +0 -39
- data/lib/log4r/evernote/lib/thrift/transport/memory_buffer_transport.rb +0 -125
- data/lib/log4r/evernote/lib/thrift/transport/server_socket.rb +0 -63
- data/lib/log4r/evernote/lib/thrift/transport/socket.rb +0 -137
- data/lib/log4r/evernote/lib/thrift/transport/unix_server_socket.rb +0 -60
- data/lib/log4r/evernote/lib/thrift/transport/unix_socket.rb +0 -40
- data/lib/log4r/evernote/lib/thrift/types.rb +0 -101
- data/lib/log4r/evernote/lib/thrift/union.rb +0 -179
- data/lib/log4r/evernote/lib/thrift.rb +0 -64
@@ -1,415 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Autogenerated by Thrift Compiler (0.8.0)
|
3
|
-
#
|
4
|
-
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
-
#
|
6
|
-
|
7
|
-
require 'types_types'
|
8
|
-
require 'errors_types'
|
9
|
-
|
10
|
-
|
11
|
-
module Evernote
|
12
|
-
module EDAM
|
13
|
-
module UserStore
|
14
|
-
module SponsoredGroupRole
|
15
|
-
GROUP_MEMBER = 1
|
16
|
-
GROUP_ADMIN = 2
|
17
|
-
GROUP_OWNER = 3
|
18
|
-
VALUE_MAP = {1 => "GROUP_MEMBER", 2 => "GROUP_ADMIN", 3 => "GROUP_OWNER"}
|
19
|
-
VALID_VALUES = Set.new([GROUP_MEMBER, GROUP_ADMIN, GROUP_OWNER]).freeze
|
20
|
-
end
|
21
|
-
|
22
|
-
# This structure is used to provide publicly-available user information
|
23
|
-
# about a particular account.
|
24
|
-
# <dl>
|
25
|
-
# <dt>userId:</dt>
|
26
|
-
# <dd>
|
27
|
-
# The unique numeric user identifier for the user account.
|
28
|
-
# </dd>
|
29
|
-
# <dt>shardId:</dt>
|
30
|
-
# <dd>
|
31
|
-
# The name of the virtual server that manages the state of
|
32
|
-
# this user. This value is used internally to determine which system should
|
33
|
-
# service requests about this user's data.
|
34
|
-
# </dd>
|
35
|
-
# <dt>privilege:</dt>
|
36
|
-
# <dd>
|
37
|
-
# The privilege level of the account, to determine whether
|
38
|
-
# this is a Premium or Free account.
|
39
|
-
# </dd>
|
40
|
-
# <dt>noteStoreUrl:</dt>
|
41
|
-
# <dd>
|
42
|
-
# This field will contain the full URL that clients should use to make
|
43
|
-
# NoteStore requests to the server shard that contains that user's data.
|
44
|
-
# I.e. this is the URL that should be used to create the Thrift HTTP client
|
45
|
-
# transport to send messages to the NoteStore service for the account.
|
46
|
-
# </dd>
|
47
|
-
# </dl>
|
48
|
-
class PublicUserInfo
|
49
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
50
|
-
USERID = 1
|
51
|
-
SHARDID = 2
|
52
|
-
PRIVILEGE = 3
|
53
|
-
USERNAME = 4
|
54
|
-
NOTESTOREURL = 5
|
55
|
-
|
56
|
-
FIELDS = {
|
57
|
-
USERID => {:type => ::Thrift::Types::I32, :name => 'userId'},
|
58
|
-
SHARDID => {:type => ::Thrift::Types::STRING, :name => 'shardId'},
|
59
|
-
PRIVILEGE => {:type => ::Thrift::Types::I32, :name => 'privilege', :optional => true, :enum_class => Evernote::EDAM::Type::PrivilegeLevel},
|
60
|
-
USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
|
61
|
-
NOTESTOREURL => {:type => ::Thrift::Types::STRING, :name => 'noteStoreUrl', :optional => true}
|
62
|
-
}
|
63
|
-
|
64
|
-
def struct_fields; FIELDS; end
|
65
|
-
|
66
|
-
def validate
|
67
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field userId is unset!') unless @userId
|
68
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field shardId is unset!') unless @shardId
|
69
|
-
unless @privilege.nil? || Evernote::EDAM::Type::PrivilegeLevel::VALID_VALUES.include?(@privilege)
|
70
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field privilege!')
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
::Thrift::Struct.generate_accessors self
|
75
|
-
end
|
76
|
-
|
77
|
-
# This structure is used to provide information about a user's Premium account.
|
78
|
-
# <dl>
|
79
|
-
# <dt>currentTime:</dt>
|
80
|
-
# <dd>
|
81
|
-
# The server-side date and time when this data was generated.
|
82
|
-
# </dd>
|
83
|
-
# <dt>premium:</dt>
|
84
|
-
# <dd>
|
85
|
-
# True if the user's account is Premium.
|
86
|
-
# </dd>
|
87
|
-
# <dt>premiumRecurring</dt>
|
88
|
-
# <dd>
|
89
|
-
# True if the user's account is Premium and has a recurring payment method.
|
90
|
-
# </dd>
|
91
|
-
# <dt>premiumExpirationDate:</dt>
|
92
|
-
# <dd>
|
93
|
-
# The date when the user's Premium account expires, or the date when the
|
94
|
-
# user's account will be charged if it has a recurring payment method.
|
95
|
-
# </dd>
|
96
|
-
# <dt>premiumExtendable:</dt>
|
97
|
-
# <dd>
|
98
|
-
# True if the user is eligible for purchasing Premium account extensions.
|
99
|
-
# </dd>
|
100
|
-
# <dt>premiumPending:</dt>
|
101
|
-
# <dd>
|
102
|
-
# True if the user's Premium account is pending payment confirmation
|
103
|
-
# </dd>
|
104
|
-
# <dt>premiumCancellationPending:</dt>
|
105
|
-
# <dd>
|
106
|
-
# True if the user has requested that no further charges to be made; the
|
107
|
-
# Premium account will remain active until it expires.
|
108
|
-
# </dd>
|
109
|
-
# <dt>canPurchaseUploadAllowance:</dt>
|
110
|
-
# <dd>
|
111
|
-
# True if the user is eligible for purchasing additional upload allowance.
|
112
|
-
# </dd>
|
113
|
-
# <dt>sponsoredGroupName:</dt>
|
114
|
-
# <dd>
|
115
|
-
# The name of the sponsored group that the user is part of.
|
116
|
-
# </dd>
|
117
|
-
# <dt>sponsoredGroupRole:</dt>
|
118
|
-
# <dd>
|
119
|
-
# The role of the user within a sponsored group.
|
120
|
-
# </dd>
|
121
|
-
# <dt>businessName:</dt>
|
122
|
-
# <dd>
|
123
|
-
# The name of the business that the user is associated with.
|
124
|
-
# </dd>
|
125
|
-
# <dt>businessAdmin:</dt>
|
126
|
-
# <dd>
|
127
|
-
# True if the user is the administrator of the business.
|
128
|
-
# </dd>
|
129
|
-
# </dl>
|
130
|
-
class PremiumInfo
|
131
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
132
|
-
CURRENTTIME = 1
|
133
|
-
PREMIUM = 2
|
134
|
-
PREMIUMRECURRING = 3
|
135
|
-
PREMIUMEXPIRATIONDATE = 4
|
136
|
-
PREMIUMEXTENDABLE = 5
|
137
|
-
PREMIUMPENDING = 6
|
138
|
-
PREMIUMCANCELLATIONPENDING = 7
|
139
|
-
CANPURCHASEUPLOADALLOWANCE = 8
|
140
|
-
SPONSOREDGROUPNAME = 9
|
141
|
-
SPONSOREDGROUPROLE = 10
|
142
|
-
BUSINESSNAME = 11
|
143
|
-
BUSINESSADMIN = 12
|
144
|
-
|
145
|
-
FIELDS = {
|
146
|
-
CURRENTTIME => {:type => ::Thrift::Types::I64, :name => 'currentTime'},
|
147
|
-
PREMIUM => {:type => ::Thrift::Types::BOOL, :name => 'premium'},
|
148
|
-
PREMIUMRECURRING => {:type => ::Thrift::Types::BOOL, :name => 'premiumRecurring'},
|
149
|
-
PREMIUMEXPIRATIONDATE => {:type => ::Thrift::Types::I64, :name => 'premiumExpirationDate', :optional => true},
|
150
|
-
PREMIUMEXTENDABLE => {:type => ::Thrift::Types::BOOL, :name => 'premiumExtendable'},
|
151
|
-
PREMIUMPENDING => {:type => ::Thrift::Types::BOOL, :name => 'premiumPending'},
|
152
|
-
PREMIUMCANCELLATIONPENDING => {:type => ::Thrift::Types::BOOL, :name => 'premiumCancellationPending'},
|
153
|
-
CANPURCHASEUPLOADALLOWANCE => {:type => ::Thrift::Types::BOOL, :name => 'canPurchaseUploadAllowance'},
|
154
|
-
SPONSOREDGROUPNAME => {:type => ::Thrift::Types::STRING, :name => 'sponsoredGroupName', :optional => true},
|
155
|
-
SPONSOREDGROUPROLE => {:type => ::Thrift::Types::I32, :name => 'sponsoredGroupRole', :optional => true, :enum_class => Evernote::EDAM::UserStore::SponsoredGroupRole},
|
156
|
-
BUSINESSNAME => {:type => ::Thrift::Types::STRING, :name => 'businessName', :optional => true},
|
157
|
-
BUSINESSADMIN => {:type => ::Thrift::Types::BOOL, :name => 'businessAdmin', :optional => true}
|
158
|
-
}
|
159
|
-
|
160
|
-
def struct_fields; FIELDS; end
|
161
|
-
|
162
|
-
def validate
|
163
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field currentTime is unset!') unless @currentTime
|
164
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premium is unset!') if @premium.nil?
|
165
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumRecurring is unset!') if @premiumRecurring.nil?
|
166
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumExtendable is unset!') if @premiumExtendable.nil?
|
167
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumPending is unset!') if @premiumPending.nil?
|
168
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumCancellationPending is unset!') if @premiumCancellationPending.nil?
|
169
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field canPurchaseUploadAllowance is unset!') if @canPurchaseUploadAllowance.nil?
|
170
|
-
unless @sponsoredGroupRole.nil? || Evernote::EDAM::UserStore::SponsoredGroupRole::VALID_VALUES.include?(@sponsoredGroupRole)
|
171
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field sponsoredGroupRole!')
|
172
|
-
end
|
173
|
-
end
|
174
|
-
|
175
|
-
::Thrift::Struct.generate_accessors self
|
176
|
-
end
|
177
|
-
|
178
|
-
# When an authentication (or re-authentication) is performed, this structure
|
179
|
-
# provides the result to the client.
|
180
|
-
# <dl>
|
181
|
-
# <dt>currentTime:</dt>
|
182
|
-
# <dd>
|
183
|
-
# The server-side date and time when this result was
|
184
|
-
# generated.
|
185
|
-
# </dd>
|
186
|
-
# <dt>authenticationToken:</dt>
|
187
|
-
# <dd>
|
188
|
-
# Holds an opaque, ASCII-encoded token that can be
|
189
|
-
# used by the client to perform actions on a NoteStore.
|
190
|
-
# </dd>
|
191
|
-
# <dt>expiration:</dt>
|
192
|
-
# <dd>
|
193
|
-
# Holds the server-side date and time when the
|
194
|
-
# authentication token will expire.
|
195
|
-
# This time can be compared to "currentTime" to produce an expiration
|
196
|
-
# time that can be reconciled with the client's local clock.
|
197
|
-
# </dd>
|
198
|
-
# <dt>user:</dt>
|
199
|
-
# <dd>
|
200
|
-
# Holds the information about the account which was
|
201
|
-
# authenticated if this was a full authentication. May be absent if this
|
202
|
-
# particular authentication did not require user information.
|
203
|
-
# </dd>
|
204
|
-
# <dt>publicUserInfo:</dt>
|
205
|
-
# <dd>
|
206
|
-
# If this authentication result was achieved without full permissions to
|
207
|
-
# access the full User structure, this field may be set to give back
|
208
|
-
# a more limited public set of data.
|
209
|
-
# </dd>
|
210
|
-
# <dt>noteStoreUrl:</dt>
|
211
|
-
# <dd>
|
212
|
-
# This field will contain the full URL that clients should use to make
|
213
|
-
# NoteStore requests to the server shard that contains that user's data.
|
214
|
-
# I.e. this is the URL that should be used to create the Thrift HTTP client
|
215
|
-
# transport to send messages to the NoteStore service for the account.
|
216
|
-
# </dd>
|
217
|
-
# <dt>webApiUrlPrefix:</dt>
|
218
|
-
# <dd>
|
219
|
-
# This field will contain the initial part of the URLs that should be used
|
220
|
-
# to make requests to Evernote's thin client "web API", which provide
|
221
|
-
# optimized operations for clients that aren't capable of manipulating
|
222
|
-
# the full contents of accounts via the full Thrift data model. Clients
|
223
|
-
# should concatenate the relative path for the various servlets onto the
|
224
|
-
# end of this string to construct the full URL, as documented on our
|
225
|
-
# developer web site.
|
226
|
-
# </dd>
|
227
|
-
# </dl>
|
228
|
-
class AuthenticationResult
|
229
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
230
|
-
CURRENTTIME = 1
|
231
|
-
AUTHENTICATIONTOKEN = 2
|
232
|
-
EXPIRATION = 3
|
233
|
-
USER = 4
|
234
|
-
PUBLICUSERINFO = 5
|
235
|
-
NOTESTOREURL = 6
|
236
|
-
WEBAPIURLPREFIX = 7
|
237
|
-
|
238
|
-
FIELDS = {
|
239
|
-
CURRENTTIME => {:type => ::Thrift::Types::I64, :name => 'currentTime'},
|
240
|
-
AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'},
|
241
|
-
EXPIRATION => {:type => ::Thrift::Types::I64, :name => 'expiration'},
|
242
|
-
USER => {:type => ::Thrift::Types::STRUCT, :name => 'user', :class => Evernote::EDAM::Type::User, :optional => true},
|
243
|
-
PUBLICUSERINFO => {:type => ::Thrift::Types::STRUCT, :name => 'publicUserInfo', :class => Evernote::EDAM::UserStore::PublicUserInfo, :optional => true},
|
244
|
-
NOTESTOREURL => {:type => ::Thrift::Types::STRING, :name => 'noteStoreUrl', :optional => true},
|
245
|
-
WEBAPIURLPREFIX => {:type => ::Thrift::Types::STRING, :name => 'webApiUrlPrefix', :optional => true}
|
246
|
-
}
|
247
|
-
|
248
|
-
def struct_fields; FIELDS; end
|
249
|
-
|
250
|
-
def validate
|
251
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field currentTime is unset!') unless @currentTime
|
252
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field authenticationToken is unset!') unless @authenticationToken
|
253
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field expiration is unset!') unless @expiration
|
254
|
-
end
|
255
|
-
|
256
|
-
::Thrift::Struct.generate_accessors self
|
257
|
-
end
|
258
|
-
|
259
|
-
# This structure describes a collection of bootstrap settings.
|
260
|
-
# <dl>
|
261
|
-
# <dt>serviceHost:</dt>
|
262
|
-
# <dd>
|
263
|
-
# The hostname and optional port for composing Evernote web service URLs.
|
264
|
-
# This URL can be used to access the UserStore and related services,
|
265
|
-
# but must not be used to compose the NoteStore URL. Client applications
|
266
|
-
# must handle serviceHost values that include only the hostname
|
267
|
-
# (e.g. www.evernote.com) or both the hostname and port (e.g. www.evernote.com:8080).
|
268
|
-
# If no port is specified, or if port 443 is specified, client applications must
|
269
|
-
# use the scheme "https" when composing URLs. Otherwise, a client must use the
|
270
|
-
# scheme "http".
|
271
|
-
# </dd>
|
272
|
-
# <dt>marketingUrl:</dt>
|
273
|
-
# <dd>
|
274
|
-
# The URL stem for the Evernote corporate marketing website, e.g. http://www.evernote.com.
|
275
|
-
# This stem can be used to compose website URLs. For example, the URL of the Evernote
|
276
|
-
# Trunk is composed by appending "/about/trunk/" to the value of marketingUrl.
|
277
|
-
# </dd>
|
278
|
-
# <dt>supportUrl:</dt>
|
279
|
-
# <dd>
|
280
|
-
# The full URL for the Evernote customer support website, e.g. https://support.evernote.com.
|
281
|
-
# </dd>
|
282
|
-
# <dt>accountEmailDomain:</dt>
|
283
|
-
# <dd>
|
284
|
-
# The domain used for an Evernote user's incoming email address, which allows notes to
|
285
|
-
# be emailed into an account. E.g. m.evernote.com.
|
286
|
-
# </dd>
|
287
|
-
# <dt>enableFacebookSharing:</dt>
|
288
|
-
# <dd>
|
289
|
-
# Whether the client application should enable sharing of notes on Facebook.
|
290
|
-
# </dd>
|
291
|
-
# <dt>enableGiftSubscriptions:</dt>
|
292
|
-
# <dd>
|
293
|
-
# Whether the client application should enable gift subscriptions.
|
294
|
-
# </dd>
|
295
|
-
# <dt>enableSupportTickets:</dt>
|
296
|
-
# <dd>
|
297
|
-
# Whether the client application should enable in-client creation of support tickets.
|
298
|
-
# </dd>
|
299
|
-
# <dt>enableSharedNotebooks:</dt>
|
300
|
-
# <dd>
|
301
|
-
# Whether the client application should enable shared notebooks.
|
302
|
-
# </dd>
|
303
|
-
# <dt>enableSingleNoteSharing:</dt>
|
304
|
-
# <dd>
|
305
|
-
# Whether the client application should enable single note sharing.
|
306
|
-
# </dd>
|
307
|
-
# <dt>enableSponsoredAccounts:</dt>
|
308
|
-
# <dd>
|
309
|
-
# Whether the client application should enable sponsored accounts.
|
310
|
-
# </dd>
|
311
|
-
# <dt>enableTwitterSharing:</dt>
|
312
|
-
# <dd>
|
313
|
-
# Whether the client application should enable sharing of notes on Twitter.
|
314
|
-
# </dd>
|
315
|
-
# </dl>
|
316
|
-
class BootstrapSettings
|
317
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
318
|
-
SERVICEHOST = 1
|
319
|
-
MARKETINGURL = 2
|
320
|
-
SUPPORTURL = 3
|
321
|
-
ACCOUNTEMAILDOMAIN = 4
|
322
|
-
ENABLEFACEBOOKSHARING = 5
|
323
|
-
ENABLEGIFTSUBSCRIPTIONS = 6
|
324
|
-
ENABLESUPPORTTICKETS = 7
|
325
|
-
ENABLESHAREDNOTEBOOKS = 8
|
326
|
-
ENABLESINGLENOTESHARING = 9
|
327
|
-
ENABLESPONSOREDACCOUNTS = 10
|
328
|
-
ENABLETWITTERSHARING = 11
|
329
|
-
|
330
|
-
FIELDS = {
|
331
|
-
SERVICEHOST => {:type => ::Thrift::Types::STRING, :name => 'serviceHost'},
|
332
|
-
MARKETINGURL => {:type => ::Thrift::Types::STRING, :name => 'marketingUrl'},
|
333
|
-
SUPPORTURL => {:type => ::Thrift::Types::STRING, :name => 'supportUrl'},
|
334
|
-
ACCOUNTEMAILDOMAIN => {:type => ::Thrift::Types::STRING, :name => 'accountEmailDomain'},
|
335
|
-
ENABLEFACEBOOKSHARING => {:type => ::Thrift::Types::BOOL, :name => 'enableFacebookSharing', :optional => true},
|
336
|
-
ENABLEGIFTSUBSCRIPTIONS => {:type => ::Thrift::Types::BOOL, :name => 'enableGiftSubscriptions', :optional => true},
|
337
|
-
ENABLESUPPORTTICKETS => {:type => ::Thrift::Types::BOOL, :name => 'enableSupportTickets', :optional => true},
|
338
|
-
ENABLESHAREDNOTEBOOKS => {:type => ::Thrift::Types::BOOL, :name => 'enableSharedNotebooks', :optional => true},
|
339
|
-
ENABLESINGLENOTESHARING => {:type => ::Thrift::Types::BOOL, :name => 'enableSingleNoteSharing', :optional => true},
|
340
|
-
ENABLESPONSOREDACCOUNTS => {:type => ::Thrift::Types::BOOL, :name => 'enableSponsoredAccounts', :optional => true},
|
341
|
-
ENABLETWITTERSHARING => {:type => ::Thrift::Types::BOOL, :name => 'enableTwitterSharing', :optional => true}
|
342
|
-
}
|
343
|
-
|
344
|
-
def struct_fields; FIELDS; end
|
345
|
-
|
346
|
-
def validate
|
347
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field serviceHost is unset!') unless @serviceHost
|
348
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field marketingUrl is unset!') unless @marketingUrl
|
349
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field supportUrl is unset!') unless @supportUrl
|
350
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field accountEmailDomain is unset!') unless @accountEmailDomain
|
351
|
-
end
|
352
|
-
|
353
|
-
::Thrift::Struct.generate_accessors self
|
354
|
-
end
|
355
|
-
|
356
|
-
# This structure describes a collection of bootstrap settings.
|
357
|
-
# <dl>
|
358
|
-
# <dt>name:</dt>
|
359
|
-
# <dd>
|
360
|
-
# The unique name of the profile, which is guaranteed to remain consistent across
|
361
|
-
# calls to getBootstrapInfo.
|
362
|
-
# </dd>
|
363
|
-
# <dt>settings:</dt>
|
364
|
-
# <dd>
|
365
|
-
# The settings for this profile.
|
366
|
-
# </dd>
|
367
|
-
# </dl>
|
368
|
-
class BootstrapProfile
|
369
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
370
|
-
NAME = 1
|
371
|
-
SETTINGS = 2
|
372
|
-
|
373
|
-
FIELDS = {
|
374
|
-
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
375
|
-
SETTINGS => {:type => ::Thrift::Types::STRUCT, :name => 'settings', :class => Evernote::EDAM::UserStore::BootstrapSettings}
|
376
|
-
}
|
377
|
-
|
378
|
-
def struct_fields; FIELDS; end
|
379
|
-
|
380
|
-
def validate
|
381
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
|
382
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field settings is unset!') unless @settings
|
383
|
-
end
|
384
|
-
|
385
|
-
::Thrift::Struct.generate_accessors self
|
386
|
-
end
|
387
|
-
|
388
|
-
# This structure describes a collection of bootstrap profiles.
|
389
|
-
# <dl>
|
390
|
-
# <dt>profiles:</dt>
|
391
|
-
# <dd>
|
392
|
-
# List of one or more bootstrap profiles, in descending
|
393
|
-
# preference order.
|
394
|
-
# </dd>
|
395
|
-
# </dl>
|
396
|
-
class BootstrapInfo
|
397
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
398
|
-
PROFILES = 1
|
399
|
-
|
400
|
-
FIELDS = {
|
401
|
-
PROFILES => {:type => ::Thrift::Types::LIST, :name => 'profiles', :element => {:type => ::Thrift::Types::STRUCT, :class => Evernote::EDAM::UserStore::BootstrapProfile}}
|
402
|
-
}
|
403
|
-
|
404
|
-
def struct_fields; FIELDS; end
|
405
|
-
|
406
|
-
def validate
|
407
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field profiles is unset!') unless @profiles
|
408
|
-
end
|
409
|
-
|
410
|
-
::Thrift::Struct.generate_accessors self
|
411
|
-
end
|
412
|
-
|
413
|
-
end
|
414
|
-
end
|
415
|
-
end
|
@@ -1,62 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Licensed to the Apache Software Foundation (ASF) under one
|
3
|
-
# or more contributor license agreements. See the NOTICE file
|
4
|
-
# distributed with this work for additional information
|
5
|
-
# regarding copyright ownership. The ASF licenses this file
|
6
|
-
# to you under the Apache License, Version 2.0 (the
|
7
|
-
# "License"); you may not use this file except in compliance
|
8
|
-
# with the License. You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing,
|
13
|
-
# software distributed under the License is distributed on an
|
14
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
15
|
-
# KIND, either express or implied. See the License for the
|
16
|
-
# specific language governing permissions and limitations
|
17
|
-
# under the License.
|
18
|
-
#
|
19
|
-
|
20
|
-
module Thrift
|
21
|
-
module Client
|
22
|
-
def initialize(iprot, oprot=nil)
|
23
|
-
@iprot = iprot
|
24
|
-
@oprot = oprot || iprot
|
25
|
-
@seqid = 0
|
26
|
-
end
|
27
|
-
|
28
|
-
def send_message(name, args_class, args = {})
|
29
|
-
@oprot.write_message_begin(name, MessageTypes::CALL, @seqid)
|
30
|
-
data = args_class.new
|
31
|
-
args.each do |k, v|
|
32
|
-
data.send("#{k.to_s}=", v)
|
33
|
-
end
|
34
|
-
begin
|
35
|
-
data.write(@oprot)
|
36
|
-
rescue StandardError => e
|
37
|
-
@oprot.trans.close
|
38
|
-
raise e
|
39
|
-
end
|
40
|
-
@oprot.write_message_end
|
41
|
-
@oprot.trans.flush
|
42
|
-
end
|
43
|
-
|
44
|
-
def receive_message(result_klass)
|
45
|
-
fname, mtype, rseqid = @iprot.read_message_begin
|
46
|
-
handle_exception(mtype)
|
47
|
-
result = result_klass.new
|
48
|
-
result.read(@iprot)
|
49
|
-
@iprot.read_message_end
|
50
|
-
result
|
51
|
-
end
|
52
|
-
|
53
|
-
def handle_exception(mtype)
|
54
|
-
if mtype == MessageTypes::EXCEPTION
|
55
|
-
x = ApplicationException.new
|
56
|
-
x.read(@iprot)
|
57
|
-
@iprot.read_message_end
|
58
|
-
raise x
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Licensed to the Apache Software Foundation (ASF) under one
|
3
|
-
# or more contributor license agreements. See the NOTICE file
|
4
|
-
# distributed with this work for additional information
|
5
|
-
# regarding copyright ownership. The ASF licenses this file
|
6
|
-
# to you under the Apache License, Version 2.0 (the
|
7
|
-
# "License"); you may not use this file except in compliance
|
8
|
-
# with the License. You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing,
|
13
|
-
# software distributed under the License is distributed on an
|
14
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
15
|
-
# KIND, either express or implied. See the License for the
|
16
|
-
# specific language governing permissions and limitations
|
17
|
-
# under the License.
|
18
|
-
#
|
19
|
-
|
20
|
-
# Versions of ruby pre 1.8.7 do not have an .ord method available in the Fixnum
|
21
|
-
# class.
|
22
|
-
#
|
23
|
-
if RUBY_VERSION < "1.8.7"
|
24
|
-
class Fixnum
|
25
|
-
def ord
|
26
|
-
self
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Licensed to the Apache Software Foundation (ASF) under one
|
3
|
-
# or more contributor license agreements. See the NOTICE file
|
4
|
-
# distributed with this work for additional information
|
5
|
-
# regarding copyright ownership. The ASF licenses this file
|
6
|
-
# to you under the Apache License, Version 2.0 (the
|
7
|
-
# "License"); you may not use this file except in compliance
|
8
|
-
# with the License. You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing,
|
13
|
-
# software distributed under the License is distributed on an
|
14
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
15
|
-
# KIND, either express or implied. See the License for the
|
16
|
-
# specific language governing permissions and limitations
|
17
|
-
# under the License.
|
18
|
-
#
|
19
|
-
|
20
|
-
Dir[File.dirname(__FILE__) + "/core_ext/*.rb"].each do |file|
|
21
|
-
name = File.basename(file, '.rb')
|
22
|
-
require "thrift/core_ext/#{name}"
|
23
|
-
end
|
@@ -1,84 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Licensed to the Apache Software Foundation (ASF) under one
|
3
|
-
# or more contributor license agreements. See the NOTICE file
|
4
|
-
# distributed with this work for additional information
|
5
|
-
# regarding copyright ownership. The ASF licenses this file
|
6
|
-
# to you under the Apache License, Version 2.0 (the
|
7
|
-
# "License"); you may not use this file except in compliance
|
8
|
-
# with the License. You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing,
|
13
|
-
# software distributed under the License is distributed on an
|
14
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
15
|
-
# KIND, either express or implied. See the License for the
|
16
|
-
# specific language governing permissions and limitations
|
17
|
-
# under the License.
|
18
|
-
#
|
19
|
-
|
20
|
-
module Thrift
|
21
|
-
class Exception < StandardError
|
22
|
-
def initialize(message)
|
23
|
-
super
|
24
|
-
@message = message
|
25
|
-
end
|
26
|
-
|
27
|
-
attr_reader :message
|
28
|
-
end
|
29
|
-
|
30
|
-
class ApplicationException < Exception
|
31
|
-
|
32
|
-
UNKNOWN = 0
|
33
|
-
UNKNOWN_METHOD = 1
|
34
|
-
INVALID_MESSAGE_TYPE = 2
|
35
|
-
WRONG_METHOD_NAME = 3
|
36
|
-
BAD_SEQUENCE_ID = 4
|
37
|
-
MISSING_RESULT = 5
|
38
|
-
INTERNAL_ERROR = 6
|
39
|
-
PROTOCOL_ERROR = 7
|
40
|
-
|
41
|
-
attr_reader :type
|
42
|
-
|
43
|
-
def initialize(type=UNKNOWN, message=nil)
|
44
|
-
super(message)
|
45
|
-
@type = type
|
46
|
-
end
|
47
|
-
|
48
|
-
def read(iprot)
|
49
|
-
iprot.read_struct_begin
|
50
|
-
while true
|
51
|
-
fname, ftype, fid = iprot.read_field_begin
|
52
|
-
if ftype == Types::STOP
|
53
|
-
break
|
54
|
-
end
|
55
|
-
if fid == 1 and ftype == Types::STRING
|
56
|
-
@message = iprot.read_string
|
57
|
-
elsif fid == 2 and ftype == Types::I32
|
58
|
-
@type = iprot.read_i32
|
59
|
-
else
|
60
|
-
iprot.skip(ftype)
|
61
|
-
end
|
62
|
-
iprot.read_field_end
|
63
|
-
end
|
64
|
-
iprot.read_struct_end
|
65
|
-
end
|
66
|
-
|
67
|
-
def write(oprot)
|
68
|
-
oprot.write_struct_begin('Thrift::ApplicationException')
|
69
|
-
unless @message.nil?
|
70
|
-
oprot.write_field_begin('message', Types::STRING, 1)
|
71
|
-
oprot.write_string(@message)
|
72
|
-
oprot.write_field_end
|
73
|
-
end
|
74
|
-
unless @type.nil?
|
75
|
-
oprot.write_field_begin('type', Types::I32, 2)
|
76
|
-
oprot.write_i32(@type)
|
77
|
-
oprot.write_field_end
|
78
|
-
end
|
79
|
-
oprot.write_field_stop
|
80
|
-
oprot.write_struct_end
|
81
|
-
end
|
82
|
-
|
83
|
-
end
|
84
|
-
end
|
@@ -1,57 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Licensed to the Apache Software Foundation (ASF) under one
|
3
|
-
# or more contributor license agreements. See the NOTICE file
|
4
|
-
# distributed with this work for additional information
|
5
|
-
# regarding copyright ownership. The ASF licenses this file
|
6
|
-
# to you under the Apache License, Version 2.0 (the
|
7
|
-
# "License"); you may not use this file except in compliance
|
8
|
-
# with the License. You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing,
|
13
|
-
# software distributed under the License is distributed on an
|
14
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
15
|
-
# KIND, either express or implied. See the License for the
|
16
|
-
# specific language governing permissions and limitations
|
17
|
-
# under the License.
|
18
|
-
#
|
19
|
-
|
20
|
-
module Thrift
|
21
|
-
module Processor
|
22
|
-
def initialize(handler)
|
23
|
-
@handler = handler
|
24
|
-
end
|
25
|
-
|
26
|
-
def process(iprot, oprot)
|
27
|
-
name, type, seqid = iprot.read_message_begin
|
28
|
-
if respond_to?("process_#{name}")
|
29
|
-
send("process_#{name}", seqid, iprot, oprot)
|
30
|
-
true
|
31
|
-
else
|
32
|
-
iprot.skip(Types::STRUCT)
|
33
|
-
iprot.read_message_end
|
34
|
-
x = ApplicationException.new(ApplicationException::UNKNOWN_METHOD, 'Unknown function '+name)
|
35
|
-
oprot.write_message_begin(name, MessageTypes::EXCEPTION, seqid)
|
36
|
-
x.write(oprot)
|
37
|
-
oprot.write_message_end
|
38
|
-
oprot.trans.flush
|
39
|
-
false
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
def read_args(iprot, args_class)
|
44
|
-
args = args_class.new
|
45
|
-
args.read(iprot)
|
46
|
-
iprot.read_message_end
|
47
|
-
args
|
48
|
-
end
|
49
|
-
|
50
|
-
def write_result(result, oprot, name, seqid)
|
51
|
-
oprot.write_message_begin(name, MessageTypes::REPLY, seqid)
|
52
|
-
result.write(oprot)
|
53
|
-
oprot.write_message_end
|
54
|
-
oprot.trans.flush
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|