author | Mario Ferraro <fadinlight@gmail.com> |
Sun, 15 Nov 2009 22:12:20 +0100 | |
changeset 3093 | d1be59b6b627 |
parent 3031 | 7678f72140e6 |
permissions | -rw-r--r-- |
109
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
1 |
#!/usr/bin/env python |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
2 |
# |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
3 |
# Copyright 2007 Google Inc. |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
4 |
# |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
5 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
6 |
# you may not use this file except in compliance with the License. |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
7 |
# You may obtain a copy of the License at |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
8 |
# |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
9 |
# http://www.apache.org/licenses/LICENSE-2.0 |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
10 |
# |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
11 |
# Unless required by applicable law or agreed to in writing, software |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
12 |
# distributed under the License is distributed on an "AS IS" BASIS, |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
13 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
14 |
# See the License for the specific language governing permissions and |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
15 |
# limitations under the License. |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
16 |
# |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
17 |
|
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
18 |
from google.net.proto import ProtocolBuffer |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
19 |
import array |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
20 |
import dummy_thread as thread |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
21 |
|
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
22 |
__pychecker__ = """maxreturns=0 maxbranches=0 no-callinit |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
23 |
unusednames=printElemNumber,debug_strs no-special""" |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
24 |
|
2309
be1b94099f2d
Update Google App Engine to 1.2.2 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
1278
diff
changeset
|
25 |
from google.appengine.api.api_base_pb import * |
109
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
26 |
class UserServiceError(ProtocolBuffer.ProtocolMessage): |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
27 |
|
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
28 |
OK = 0 |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
29 |
REDIRECT_URL_TOO_LONG = 1 |
1278
a7766286a7be
Load /Users/solydzajs/Downloads/google_appengine into
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
828
diff
changeset
|
30 |
NOT_ALLOWED = 2 |
3031
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
31 |
OAUTH_INVALID_TOKEN = 3 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
32 |
OAUTH_INVALID_REQUEST = 4 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
33 |
OAUTH_ERROR = 5 |
109
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
34 |
|
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
35 |
_ErrorCode_NAMES = { |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
36 |
0: "OK", |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
37 |
1: "REDIRECT_URL_TOO_LONG", |
1278
a7766286a7be
Load /Users/solydzajs/Downloads/google_appengine into
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
828
diff
changeset
|
38 |
2: "NOT_ALLOWED", |
3031
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
39 |
3: "OAUTH_INVALID_TOKEN", |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
40 |
4: "OAUTH_INVALID_REQUEST", |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
41 |
5: "OAUTH_ERROR", |
109
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
42 |
} |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
43 |
|
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
44 |
def ErrorCode_Name(cls, x): return cls._ErrorCode_NAMES.get(x, "") |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
45 |
ErrorCode_Name = classmethod(ErrorCode_Name) |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
46 |
|
149
f2e327a7c5de
Load ../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
109
diff
changeset
|
47 |
|
109
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
48 |
def __init__(self, contents=None): |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
49 |
pass |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
50 |
if contents is not None: self.MergeFromString(contents) |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
51 |
|
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
52 |
|
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
53 |
def MergeFrom(self, x): |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
54 |
assert x is not self |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
55 |
|
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
56 |
def Equals(self, x): |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
57 |
if x is self: return 1 |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
58 |
return 1 |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
59 |
|
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
60 |
def IsInitialized(self, debug_strs=None): |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
61 |
initialized = 1 |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
62 |
return initialized |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
63 |
|
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
64 |
def ByteSize(self): |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
65 |
n = 0 |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
66 |
return n + 0 |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
67 |
|
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
68 |
def Clear(self): |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
69 |
pass |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
70 |
|
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
71 |
def OutputUnchecked(self, out): |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
72 |
pass |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
73 |
|
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
74 |
def TryMerge(self, d): |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
75 |
while d.avail() > 0: |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
76 |
tt = d.getVarInt32() |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
77 |
if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
78 |
d.skipData(tt) |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
79 |
|
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
80 |
|
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
81 |
def __str__(self, prefix="", printElemNumber=0): |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
82 |
res="" |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
83 |
return res |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
84 |
|
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
85 |
|
2864
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
86 |
def _BuildTagLookupTable(sparse, maxtag, default=None): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
87 |
return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)]) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
88 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
89 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
90 |
_TEXT = _BuildTagLookupTable({ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
91 |
0: "ErrorCode", |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
92 |
}, 0) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
93 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
94 |
_TYPES = _BuildTagLookupTable({ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
95 |
0: ProtocolBuffer.Encoder.NUMERIC, |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
96 |
}, 0, ProtocolBuffer.Encoder.MAX_TYPE) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
97 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
98 |
_STYLE = """""" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
99 |
_STYLE_CONTENT_TYPE = """""" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
100 |
class CreateLoginURLRequest(ProtocolBuffer.ProtocolMessage): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
101 |
has_destination_url_ = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
102 |
destination_url_ = "" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
103 |
has_auth_domain_ = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
104 |
auth_domain_ = "" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
105 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
106 |
def __init__(self, contents=None): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
107 |
if contents is not None: self.MergeFromString(contents) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
108 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
109 |
def destination_url(self): return self.destination_url_ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
110 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
111 |
def set_destination_url(self, x): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
112 |
self.has_destination_url_ = 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
113 |
self.destination_url_ = x |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
114 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
115 |
def clear_destination_url(self): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
116 |
if self.has_destination_url_: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
117 |
self.has_destination_url_ = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
118 |
self.destination_url_ = "" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
119 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
120 |
def has_destination_url(self): return self.has_destination_url_ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
121 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
122 |
def auth_domain(self): return self.auth_domain_ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
123 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
124 |
def set_auth_domain(self, x): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
125 |
self.has_auth_domain_ = 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
126 |
self.auth_domain_ = x |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
127 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
128 |
def clear_auth_domain(self): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
129 |
if self.has_auth_domain_: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
130 |
self.has_auth_domain_ = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
131 |
self.auth_domain_ = "" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
132 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
133 |
def has_auth_domain(self): return self.has_auth_domain_ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
134 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
135 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
136 |
def MergeFrom(self, x): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
137 |
assert x is not self |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
138 |
if (x.has_destination_url()): self.set_destination_url(x.destination_url()) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
139 |
if (x.has_auth_domain()): self.set_auth_domain(x.auth_domain()) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
140 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
141 |
def Equals(self, x): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
142 |
if x is self: return 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
143 |
if self.has_destination_url_ != x.has_destination_url_: return 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
144 |
if self.has_destination_url_ and self.destination_url_ != x.destination_url_: return 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
145 |
if self.has_auth_domain_ != x.has_auth_domain_: return 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
146 |
if self.has_auth_domain_ and self.auth_domain_ != x.auth_domain_: return 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
147 |
return 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
148 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
149 |
def IsInitialized(self, debug_strs=None): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
150 |
initialized = 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
151 |
if (not self.has_destination_url_): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
152 |
initialized = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
153 |
if debug_strs is not None: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
154 |
debug_strs.append('Required field: destination_url not set.') |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
155 |
return initialized |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
156 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
157 |
def ByteSize(self): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
158 |
n = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
159 |
n += self.lengthString(len(self.destination_url_)) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
160 |
if (self.has_auth_domain_): n += 1 + self.lengthString(len(self.auth_domain_)) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
161 |
return n + 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
162 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
163 |
def Clear(self): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
164 |
self.clear_destination_url() |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
165 |
self.clear_auth_domain() |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
166 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
167 |
def OutputUnchecked(self, out): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
168 |
out.putVarInt32(10) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
169 |
out.putPrefixedString(self.destination_url_) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
170 |
if (self.has_auth_domain_): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
171 |
out.putVarInt32(18) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
172 |
out.putPrefixedString(self.auth_domain_) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
173 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
174 |
def TryMerge(self, d): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
175 |
while d.avail() > 0: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
176 |
tt = d.getVarInt32() |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
177 |
if tt == 10: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
178 |
self.set_destination_url(d.getPrefixedString()) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
179 |
continue |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
180 |
if tt == 18: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
181 |
self.set_auth_domain(d.getPrefixedString()) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
182 |
continue |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
183 |
if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
184 |
d.skipData(tt) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
185 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
186 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
187 |
def __str__(self, prefix="", printElemNumber=0): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
188 |
res="" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
189 |
if self.has_destination_url_: res+=prefix+("destination_url: %s\n" % self.DebugFormatString(self.destination_url_)) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
190 |
if self.has_auth_domain_: res+=prefix+("auth_domain: %s\n" % self.DebugFormatString(self.auth_domain_)) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
191 |
return res |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
192 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
193 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
194 |
def _BuildTagLookupTable(sparse, maxtag, default=None): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
195 |
return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)]) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
196 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
197 |
kdestination_url = 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
198 |
kauth_domain = 2 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
199 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
200 |
_TEXT = _BuildTagLookupTable({ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
201 |
0: "ErrorCode", |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
202 |
1: "destination_url", |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
203 |
2: "auth_domain", |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
204 |
}, 2) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
205 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
206 |
_TYPES = _BuildTagLookupTable({ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
207 |
0: ProtocolBuffer.Encoder.NUMERIC, |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
208 |
1: ProtocolBuffer.Encoder.STRING, |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
209 |
2: ProtocolBuffer.Encoder.STRING, |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
210 |
}, 2, ProtocolBuffer.Encoder.MAX_TYPE) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
211 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
212 |
_STYLE = """""" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
213 |
_STYLE_CONTENT_TYPE = """""" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
214 |
class CreateLoginURLResponse(ProtocolBuffer.ProtocolMessage): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
215 |
has_login_url_ = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
216 |
login_url_ = "" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
217 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
218 |
def __init__(self, contents=None): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
219 |
if contents is not None: self.MergeFromString(contents) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
220 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
221 |
def login_url(self): return self.login_url_ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
222 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
223 |
def set_login_url(self, x): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
224 |
self.has_login_url_ = 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
225 |
self.login_url_ = x |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
226 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
227 |
def clear_login_url(self): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
228 |
if self.has_login_url_: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
229 |
self.has_login_url_ = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
230 |
self.login_url_ = "" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
231 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
232 |
def has_login_url(self): return self.has_login_url_ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
233 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
234 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
235 |
def MergeFrom(self, x): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
236 |
assert x is not self |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
237 |
if (x.has_login_url()): self.set_login_url(x.login_url()) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
238 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
239 |
def Equals(self, x): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
240 |
if x is self: return 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
241 |
if self.has_login_url_ != x.has_login_url_: return 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
242 |
if self.has_login_url_ and self.login_url_ != x.login_url_: return 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
243 |
return 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
244 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
245 |
def IsInitialized(self, debug_strs=None): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
246 |
initialized = 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
247 |
if (not self.has_login_url_): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
248 |
initialized = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
249 |
if debug_strs is not None: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
250 |
debug_strs.append('Required field: login_url not set.') |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
251 |
return initialized |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
252 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
253 |
def ByteSize(self): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
254 |
n = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
255 |
n += self.lengthString(len(self.login_url_)) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
256 |
return n + 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
257 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
258 |
def Clear(self): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
259 |
self.clear_login_url() |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
260 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
261 |
def OutputUnchecked(self, out): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
262 |
out.putVarInt32(10) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
263 |
out.putPrefixedString(self.login_url_) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
264 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
265 |
def TryMerge(self, d): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
266 |
while d.avail() > 0: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
267 |
tt = d.getVarInt32() |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
268 |
if tt == 10: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
269 |
self.set_login_url(d.getPrefixedString()) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
270 |
continue |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
271 |
if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
272 |
d.skipData(tt) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
273 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
274 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
275 |
def __str__(self, prefix="", printElemNumber=0): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
276 |
res="" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
277 |
if self.has_login_url_: res+=prefix+("login_url: %s\n" % self.DebugFormatString(self.login_url_)) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
278 |
return res |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
279 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
280 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
281 |
def _BuildTagLookupTable(sparse, maxtag, default=None): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
282 |
return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)]) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
283 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
284 |
klogin_url = 1 |
109
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
285 |
|
2864
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
286 |
_TEXT = _BuildTagLookupTable({ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
287 |
0: "ErrorCode", |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
288 |
1: "login_url", |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
289 |
}, 1) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
290 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
291 |
_TYPES = _BuildTagLookupTable({ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
292 |
0: ProtocolBuffer.Encoder.NUMERIC, |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
293 |
1: ProtocolBuffer.Encoder.STRING, |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
294 |
}, 1, ProtocolBuffer.Encoder.MAX_TYPE) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
295 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
296 |
_STYLE = """""" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
297 |
_STYLE_CONTENT_TYPE = """""" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
298 |
class CreateLogoutURLRequest(ProtocolBuffer.ProtocolMessage): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
299 |
has_destination_url_ = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
300 |
destination_url_ = "" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
301 |
has_auth_domain_ = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
302 |
auth_domain_ = "" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
303 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
304 |
def __init__(self, contents=None): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
305 |
if contents is not None: self.MergeFromString(contents) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
306 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
307 |
def destination_url(self): return self.destination_url_ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
308 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
309 |
def set_destination_url(self, x): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
310 |
self.has_destination_url_ = 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
311 |
self.destination_url_ = x |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
312 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
313 |
def clear_destination_url(self): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
314 |
if self.has_destination_url_: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
315 |
self.has_destination_url_ = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
316 |
self.destination_url_ = "" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
317 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
318 |
def has_destination_url(self): return self.has_destination_url_ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
319 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
320 |
def auth_domain(self): return self.auth_domain_ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
321 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
322 |
def set_auth_domain(self, x): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
323 |
self.has_auth_domain_ = 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
324 |
self.auth_domain_ = x |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
325 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
326 |
def clear_auth_domain(self): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
327 |
if self.has_auth_domain_: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
328 |
self.has_auth_domain_ = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
329 |
self.auth_domain_ = "" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
330 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
331 |
def has_auth_domain(self): return self.has_auth_domain_ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
332 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
333 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
334 |
def MergeFrom(self, x): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
335 |
assert x is not self |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
336 |
if (x.has_destination_url()): self.set_destination_url(x.destination_url()) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
337 |
if (x.has_auth_domain()): self.set_auth_domain(x.auth_domain()) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
338 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
339 |
def Equals(self, x): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
340 |
if x is self: return 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
341 |
if self.has_destination_url_ != x.has_destination_url_: return 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
342 |
if self.has_destination_url_ and self.destination_url_ != x.destination_url_: return 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
343 |
if self.has_auth_domain_ != x.has_auth_domain_: return 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
344 |
if self.has_auth_domain_ and self.auth_domain_ != x.auth_domain_: return 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
345 |
return 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
346 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
347 |
def IsInitialized(self, debug_strs=None): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
348 |
initialized = 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
349 |
if (not self.has_destination_url_): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
350 |
initialized = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
351 |
if debug_strs is not None: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
352 |
debug_strs.append('Required field: destination_url not set.') |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
353 |
return initialized |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
354 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
355 |
def ByteSize(self): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
356 |
n = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
357 |
n += self.lengthString(len(self.destination_url_)) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
358 |
if (self.has_auth_domain_): n += 1 + self.lengthString(len(self.auth_domain_)) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
359 |
return n + 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
360 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
361 |
def Clear(self): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
362 |
self.clear_destination_url() |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
363 |
self.clear_auth_domain() |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
364 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
365 |
def OutputUnchecked(self, out): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
366 |
out.putVarInt32(10) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
367 |
out.putPrefixedString(self.destination_url_) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
368 |
if (self.has_auth_domain_): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
369 |
out.putVarInt32(18) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
370 |
out.putPrefixedString(self.auth_domain_) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
371 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
372 |
def TryMerge(self, d): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
373 |
while d.avail() > 0: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
374 |
tt = d.getVarInt32() |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
375 |
if tt == 10: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
376 |
self.set_destination_url(d.getPrefixedString()) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
377 |
continue |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
378 |
if tt == 18: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
379 |
self.set_auth_domain(d.getPrefixedString()) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
380 |
continue |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
381 |
if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
382 |
d.skipData(tt) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
383 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
384 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
385 |
def __str__(self, prefix="", printElemNumber=0): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
386 |
res="" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
387 |
if self.has_destination_url_: res+=prefix+("destination_url: %s\n" % self.DebugFormatString(self.destination_url_)) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
388 |
if self.has_auth_domain_: res+=prefix+("auth_domain: %s\n" % self.DebugFormatString(self.auth_domain_)) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
389 |
return res |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
390 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
391 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
392 |
def _BuildTagLookupTable(sparse, maxtag, default=None): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
393 |
return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)]) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
394 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
395 |
kdestination_url = 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
396 |
kauth_domain = 2 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
397 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
398 |
_TEXT = _BuildTagLookupTable({ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
399 |
0: "ErrorCode", |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
400 |
1: "destination_url", |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
401 |
2: "auth_domain", |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
402 |
}, 2) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
403 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
404 |
_TYPES = _BuildTagLookupTable({ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
405 |
0: ProtocolBuffer.Encoder.NUMERIC, |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
406 |
1: ProtocolBuffer.Encoder.STRING, |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
407 |
2: ProtocolBuffer.Encoder.STRING, |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
408 |
}, 2, ProtocolBuffer.Encoder.MAX_TYPE) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
409 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
410 |
_STYLE = """""" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
411 |
_STYLE_CONTENT_TYPE = """""" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
412 |
class CreateLogoutURLResponse(ProtocolBuffer.ProtocolMessage): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
413 |
has_logout_url_ = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
414 |
logout_url_ = "" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
415 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
416 |
def __init__(self, contents=None): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
417 |
if contents is not None: self.MergeFromString(contents) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
418 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
419 |
def logout_url(self): return self.logout_url_ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
420 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
421 |
def set_logout_url(self, x): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
422 |
self.has_logout_url_ = 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
423 |
self.logout_url_ = x |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
424 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
425 |
def clear_logout_url(self): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
426 |
if self.has_logout_url_: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
427 |
self.has_logout_url_ = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
428 |
self.logout_url_ = "" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
429 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
430 |
def has_logout_url(self): return self.has_logout_url_ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
431 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
432 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
433 |
def MergeFrom(self, x): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
434 |
assert x is not self |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
435 |
if (x.has_logout_url()): self.set_logout_url(x.logout_url()) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
436 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
437 |
def Equals(self, x): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
438 |
if x is self: return 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
439 |
if self.has_logout_url_ != x.has_logout_url_: return 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
440 |
if self.has_logout_url_ and self.logout_url_ != x.logout_url_: return 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
441 |
return 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
442 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
443 |
def IsInitialized(self, debug_strs=None): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
444 |
initialized = 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
445 |
if (not self.has_logout_url_): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
446 |
initialized = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
447 |
if debug_strs is not None: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
448 |
debug_strs.append('Required field: logout_url not set.') |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
449 |
return initialized |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
450 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
451 |
def ByteSize(self): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
452 |
n = 0 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
453 |
n += self.lengthString(len(self.logout_url_)) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
454 |
return n + 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
455 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
456 |
def Clear(self): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
457 |
self.clear_logout_url() |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
458 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
459 |
def OutputUnchecked(self, out): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
460 |
out.putVarInt32(10) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
461 |
out.putPrefixedString(self.logout_url_) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
462 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
463 |
def TryMerge(self, d): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
464 |
while d.avail() > 0: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
465 |
tt = d.getVarInt32() |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
466 |
if tt == 10: |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
467 |
self.set_logout_url(d.getPrefixedString()) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
468 |
continue |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
469 |
if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
470 |
d.skipData(tt) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
471 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
472 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
473 |
def __str__(self, prefix="", printElemNumber=0): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
474 |
res="" |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
475 |
if self.has_logout_url_: res+=prefix+("logout_url: %s\n" % self.DebugFormatString(self.logout_url_)) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
476 |
return res |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
477 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
478 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
479 |
def _BuildTagLookupTable(sparse, maxtag, default=None): |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
480 |
return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)]) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
481 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
482 |
klogout_url = 1 |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
483 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
484 |
_TEXT = _BuildTagLookupTable({ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
485 |
0: "ErrorCode", |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
486 |
1: "logout_url", |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
487 |
}, 1) |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
488 |
|
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
489 |
_TYPES = _BuildTagLookupTable({ |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
490 |
0: ProtocolBuffer.Encoder.NUMERIC, |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
491 |
1: ProtocolBuffer.Encoder.STRING, |
2e0b0af889be
Update Google App Engine from 1.2.3 to 1.2.5 in thirdparty folder.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
2309
diff
changeset
|
492 |
}, 1, ProtocolBuffer.Encoder.MAX_TYPE) |
109
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
493 |
|
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
494 |
_STYLE = """""" |
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
495 |
_STYLE_CONTENT_TYPE = """""" |
3031
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
496 |
class GetOAuthUserRequest(ProtocolBuffer.ProtocolMessage): |
109
620f9b141567
Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
497 |
|
3031
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
498 |
def __init__(self, contents=None): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
499 |
pass |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
500 |
if contents is not None: self.MergeFromString(contents) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
501 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
502 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
503 |
def MergeFrom(self, x): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
504 |
assert x is not self |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
505 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
506 |
def Equals(self, x): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
507 |
if x is self: return 1 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
508 |
return 1 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
509 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
510 |
def IsInitialized(self, debug_strs=None): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
511 |
initialized = 1 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
512 |
return initialized |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
513 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
514 |
def ByteSize(self): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
515 |
n = 0 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
516 |
return n + 0 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
517 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
518 |
def Clear(self): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
519 |
pass |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
520 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
521 |
def OutputUnchecked(self, out): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
522 |
pass |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
523 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
524 |
def TryMerge(self, d): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
525 |
while d.avail() > 0: |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
526 |
tt = d.getVarInt32() |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
527 |
if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
528 |
d.skipData(tt) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
529 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
530 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
531 |
def __str__(self, prefix="", printElemNumber=0): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
532 |
res="" |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
533 |
return res |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
534 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
535 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
536 |
def _BuildTagLookupTable(sparse, maxtag, default=None): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
537 |
return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)]) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
538 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
539 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
540 |
_TEXT = _BuildTagLookupTable({ |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
541 |
0: "ErrorCode", |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
542 |
}, 0) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
543 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
544 |
_TYPES = _BuildTagLookupTable({ |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
545 |
0: ProtocolBuffer.Encoder.NUMERIC, |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
546 |
}, 0, ProtocolBuffer.Encoder.MAX_TYPE) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
547 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
548 |
_STYLE = """""" |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
549 |
_STYLE_CONTENT_TYPE = """""" |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
550 |
class GetOAuthUserResponse(ProtocolBuffer.ProtocolMessage): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
551 |
has_email_ = 0 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
552 |
email_ = "" |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
553 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
554 |
def __init__(self, contents=None): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
555 |
if contents is not None: self.MergeFromString(contents) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
556 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
557 |
def email(self): return self.email_ |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
558 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
559 |
def set_email(self, x): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
560 |
self.has_email_ = 1 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
561 |
self.email_ = x |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
562 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
563 |
def clear_email(self): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
564 |
if self.has_email_: |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
565 |
self.has_email_ = 0 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
566 |
self.email_ = "" |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
567 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
568 |
def has_email(self): return self.has_email_ |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
569 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
570 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
571 |
def MergeFrom(self, x): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
572 |
assert x is not self |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
573 |
if (x.has_email()): self.set_email(x.email()) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
574 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
575 |
def Equals(self, x): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
576 |
if x is self: return 1 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
577 |
if self.has_email_ != x.has_email_: return 0 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
578 |
if self.has_email_ and self.email_ != x.email_: return 0 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
579 |
return 1 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
580 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
581 |
def IsInitialized(self, debug_strs=None): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
582 |
initialized = 1 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
583 |
return initialized |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
584 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
585 |
def ByteSize(self): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
586 |
n = 0 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
587 |
if (self.has_email_): n += 1 + self.lengthString(len(self.email_)) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
588 |
return n + 0 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
589 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
590 |
def Clear(self): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
591 |
self.clear_email() |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
592 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
593 |
def OutputUnchecked(self, out): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
594 |
if (self.has_email_): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
595 |
out.putVarInt32(10) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
596 |
out.putPrefixedString(self.email_) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
597 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
598 |
def TryMerge(self, d): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
599 |
while d.avail() > 0: |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
600 |
tt = d.getVarInt32() |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
601 |
if tt == 10: |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
602 |
self.set_email(d.getPrefixedString()) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
603 |
continue |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
604 |
if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
605 |
d.skipData(tt) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
606 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
607 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
608 |
def __str__(self, prefix="", printElemNumber=0): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
609 |
res="" |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
610 |
if self.has_email_: res+=prefix+("email: %s\n" % self.DebugFormatString(self.email_)) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
611 |
return res |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
612 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
613 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
614 |
def _BuildTagLookupTable(sparse, maxtag, default=None): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
615 |
return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)]) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
616 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
617 |
kemail = 1 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
618 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
619 |
_TEXT = _BuildTagLookupTable({ |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
620 |
0: "ErrorCode", |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
621 |
1: "email", |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
622 |
}, 1) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
623 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
624 |
_TYPES = _BuildTagLookupTable({ |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
625 |
0: ProtocolBuffer.Encoder.NUMERIC, |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
626 |
1: ProtocolBuffer.Encoder.STRING, |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
627 |
}, 1, ProtocolBuffer.Encoder.MAX_TYPE) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
628 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
629 |
_STYLE = """""" |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
630 |
_STYLE_CONTENT_TYPE = """""" |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
631 |
class CheckOAuthSignatureRequest(ProtocolBuffer.ProtocolMessage): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
632 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
633 |
def __init__(self, contents=None): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
634 |
pass |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
635 |
if contents is not None: self.MergeFromString(contents) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
636 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
637 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
638 |
def MergeFrom(self, x): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
639 |
assert x is not self |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
640 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
641 |
def Equals(self, x): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
642 |
if x is self: return 1 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
643 |
return 1 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
644 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
645 |
def IsInitialized(self, debug_strs=None): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
646 |
initialized = 1 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
647 |
return initialized |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
648 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
649 |
def ByteSize(self): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
650 |
n = 0 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
651 |
return n + 0 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
652 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
653 |
def Clear(self): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
654 |
pass |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
655 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
656 |
def OutputUnchecked(self, out): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
657 |
pass |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
658 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
659 |
def TryMerge(self, d): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
660 |
while d.avail() > 0: |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
661 |
tt = d.getVarInt32() |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
662 |
if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
663 |
d.skipData(tt) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
664 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
665 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
666 |
def __str__(self, prefix="", printElemNumber=0): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
667 |
res="" |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
668 |
return res |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
669 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
670 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
671 |
def _BuildTagLookupTable(sparse, maxtag, default=None): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
672 |
return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)]) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
673 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
674 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
675 |
_TEXT = _BuildTagLookupTable({ |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
676 |
0: "ErrorCode", |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
677 |
}, 0) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
678 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
679 |
_TYPES = _BuildTagLookupTable({ |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
680 |
0: ProtocolBuffer.Encoder.NUMERIC, |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
681 |
}, 0, ProtocolBuffer.Encoder.MAX_TYPE) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
682 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
683 |
_STYLE = """""" |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
684 |
_STYLE_CONTENT_TYPE = """""" |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
685 |
class CheckOAuthSignatureResponse(ProtocolBuffer.ProtocolMessage): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
686 |
has_oauth_consumer_key_ = 0 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
687 |
oauth_consumer_key_ = "" |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
688 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
689 |
def __init__(self, contents=None): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
690 |
if contents is not None: self.MergeFromString(contents) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
691 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
692 |
def oauth_consumer_key(self): return self.oauth_consumer_key_ |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
693 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
694 |
def set_oauth_consumer_key(self, x): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
695 |
self.has_oauth_consumer_key_ = 1 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
696 |
self.oauth_consumer_key_ = x |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
697 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
698 |
def clear_oauth_consumer_key(self): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
699 |
if self.has_oauth_consumer_key_: |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
700 |
self.has_oauth_consumer_key_ = 0 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
701 |
self.oauth_consumer_key_ = "" |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
702 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
703 |
def has_oauth_consumer_key(self): return self.has_oauth_consumer_key_ |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
704 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
705 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
706 |
def MergeFrom(self, x): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
707 |
assert x is not self |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
708 |
if (x.has_oauth_consumer_key()): self.set_oauth_consumer_key(x.oauth_consumer_key()) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
709 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
710 |
def Equals(self, x): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
711 |
if x is self: return 1 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
712 |
if self.has_oauth_consumer_key_ != x.has_oauth_consumer_key_: return 0 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
713 |
if self.has_oauth_consumer_key_ and self.oauth_consumer_key_ != x.oauth_consumer_key_: return 0 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
714 |
return 1 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
715 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
716 |
def IsInitialized(self, debug_strs=None): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
717 |
initialized = 1 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
718 |
return initialized |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
719 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
720 |
def ByteSize(self): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
721 |
n = 0 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
722 |
if (self.has_oauth_consumer_key_): n += 1 + self.lengthString(len(self.oauth_consumer_key_)) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
723 |
return n + 0 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
724 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
725 |
def Clear(self): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
726 |
self.clear_oauth_consumer_key() |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
727 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
728 |
def OutputUnchecked(self, out): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
729 |
if (self.has_oauth_consumer_key_): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
730 |
out.putVarInt32(10) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
731 |
out.putPrefixedString(self.oauth_consumer_key_) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
732 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
733 |
def TryMerge(self, d): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
734 |
while d.avail() > 0: |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
735 |
tt = d.getVarInt32() |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
736 |
if tt == 10: |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
737 |
self.set_oauth_consumer_key(d.getPrefixedString()) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
738 |
continue |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
739 |
if (tt == 0): raise ProtocolBuffer.ProtocolBufferDecodeError |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
740 |
d.skipData(tt) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
741 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
742 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
743 |
def __str__(self, prefix="", printElemNumber=0): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
744 |
res="" |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
745 |
if self.has_oauth_consumer_key_: res+=prefix+("oauth_consumer_key: %s\n" % self.DebugFormatString(self.oauth_consumer_key_)) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
746 |
return res |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
747 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
748 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
749 |
def _BuildTagLookupTable(sparse, maxtag, default=None): |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
750 |
return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)]) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
751 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
752 |
koauth_consumer_key = 1 |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
753 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
754 |
_TEXT = _BuildTagLookupTable({ |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
755 |
0: "ErrorCode", |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
756 |
1: "oauth_consumer_key", |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
757 |
}, 1) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
758 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
759 |
_TYPES = _BuildTagLookupTable({ |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
760 |
0: ProtocolBuffer.Encoder.NUMERIC, |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
761 |
1: ProtocolBuffer.Encoder.STRING, |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
762 |
}, 1, ProtocolBuffer.Encoder.MAX_TYPE) |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
763 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
764 |
_STYLE = """""" |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
765 |
_STYLE_CONTENT_TYPE = """""" |
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
766 |
|
7678f72140e6
Update Google App Engine from 1.2.5 to 1.2.7 in thirdparty folder.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
2864
diff
changeset
|
767 |
__all__ = ['UserServiceError','CreateLoginURLRequest','CreateLoginURLResponse','CreateLogoutURLRequest','CreateLogoutURLResponse','GetOAuthUserRequest','GetOAuthUserResponse','CheckOAuthSignatureRequest','CheckOAuthSignatureResponse'] |