[Gug-cvs] gug/gug/service/stc stc.py,1.42,1.43
Status: Planning
Brought to you by:
szferi
From: Gergo C. <cs...@us...> - 2007-05-17 09:36:04
|
Update of /cvsroot/gug/gug/gug/service/stc In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv31048/gug/service/stc Modified Files: stc.py Log Message: gugfs 0.0.1b, gugprocfs 0.0.1b and some .cvsignore wq Index: stc.py =================================================================== RCS file: /cvsroot/gug/gug/gug/service/stc/stc.py,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** stc.py 3 Apr 2007 12:50:21 -0000 1.42 --- stc.py 17 May 2007 09:36:00 -0000 1.43 *************** *** 48,52 **** if data['status'] == 'request_prepared': print 'Creating handler for prepared request %s.%s' % (token, id) ! self._create_handler(data['type'],data['path'], token, id) def _dict_to_file(self, d, fn): --- 48,52 ---- if data['status'] == 'request_prepared': print 'Creating handler for prepared request %s.%s' % (token, id) ! self._create_handler(data['type'],data['path'], token, id, data['offset'], data['size']) def _dict_to_file(self, d, fn): *************** *** 282,286 **** return [self._get_all_data(token) for token in self._get_tokens()] ! def _create_handler(self, type, filename, token, id): # create the location from token and id locations = self._locations(token, id) --- 282,286 ---- return [self._get_all_data(token) for token in self._get_tokens()] ! def _create_handler(self, type, filename, token, id, offset=-1, size=-1): # create the location from token and id locations = self._locations(token, id) *************** *** 292,296 **** handler = hclass(filename, \ self._lambda_unregister(token, id), \ ! self._lambda_alter_status(token, id)) # add the new handle to HTTPServer for location in locations: --- 292,296 ---- handler = hclass(filename, \ self._lambda_unregister(token, id), \ ! self._lambda_alter_status(token, id), offset, size) # add the new handle to HTTPServer for location in locations: *************** *** 305,309 **** return turls ! def prepareToGet(self, auth, surls): """Prepare to get files identified by SURLs. --- 305,309 ---- return turls ! def prepareToGet(self, auth, surls, offset=-1, size=-1): """Prepare to get files identified by SURLs. *************** *** 324,328 **** # if it is a real file # create a new handler for HTTPServer which will serve the download ! locations = self._create_handler('get',filename, token, id) # create a TURL turls = self._turls(locations) --- 324,328 ---- # if it is a real file # create a new handler for HTTPServer which will serve the download ! locations = self._create_handler('get',filename, token, id, offset, size) # create a TURL turls = self._turls(locations) *************** *** 332,336 **** turls = [] statuscode = 'invalid_path' ! data = {'status': statuscode, 'surl': surl, 'turls': turls, 'type' : 'get'} # save request data to file self._create_request_file(token, id, data) --- 332,336 ---- turls = [] statuscode = 'invalid_path' ! data = {'status': statuscode, 'surl': surl, 'turls': turls, 'type' : 'get', 'offset' : offset, 'size' : size} # save request data to file self._create_request_file(token, id, data) |