85 result = self.__extractData(reply) |
85 result = self.__extractData(reply) |
86 res = result["threatLists"] |
86 res = result["threatLists"] |
87 |
87 |
88 reply.deleteLater() |
88 reply.deleteLater() |
89 return res |
89 return res |
|
90 |
|
91 ####################################################################### |
|
92 ## Methods below implement the 'Update API (v4)' |
|
93 ####################################################################### |
90 |
94 |
91 def getThreatsUpdate(self, clientStates): |
95 def getThreatsUpdate(self, clientStates): |
92 """ |
96 """ |
93 Public method to fetch hash prefix updates for the given threat list. |
97 Public method to fetch hash prefix updates for the given threat list. |
94 |
98 |
252 @return fair use delay expiration date and time |
256 @return fair use delay expiration date and time |
253 @rtype QDateTime |
257 @rtype QDateTime |
254 """ |
258 """ |
255 return self.__nextRequestNoSoonerThan |
259 return self.__nextRequestNoSoonerThan |
256 |
260 |
|
261 ####################################################################### |
|
262 ## Methods below implement the 'Lookup API (v4)' |
|
263 ####################################################################### |
|
264 |
|
265 # TODO: implement the Lookup API (including temporary caching) |
|
266 |
|
267 ####################################################################### |
|
268 ## Methods below implement global (class wide) functionality |
|
269 ####################################################################### |
|
270 |
257 @classmethod |
271 @classmethod |
258 def getThreatMessage(cls, threatType): |
272 def getThreatMessage(cls, threatType): |
259 """ |
273 """ |
260 Class method to get a warning message for the given threat type. |
274 Class method to get a warning message for the given threat type. |
261 |
275 |