Skip to content
Snippets Groups Projects
Select Git revision
  • a48d08b7cd7875974186fde7b68fd0a25403ed03
  • master default
  • mingw_gcc44
  • release_ABP1_012
  • release_ABP1_008
  • release_ABP1_006
  • release_ABP1_007
  • release_ABP1_005
  • release_ABP1_004
  • release_ABP1_003
  • pre_release_0.15
  • release_ABP1_001
  • release_ABP1_002
  • pre_release_0.13
  • pre_release_0.14
  • pre_release_0.11
  • pre_release_0.12
  • pre_release_0.10
  • pre_release_0.09
  • pre_release_0.08
20 results

Doxyfile

Blame
  • Forked from einsteinathome / graphicsframework
    Source project has a limited visibility.
    pers_file_xfer.cpp 14.52 KiB
    // This file is part of BOINC.
    // http://boinc.berkeley.edu
    // Copyright (C) 2008 University of California
    //
    // BOINC is free software; you can redistribute it and/or modify it
    // under the terms of the GNU Lesser General Public License
    // as published by the Free Software Foundation,
    // either version 3 of the License, or (at your option) any later version.
    //
    // BOINC is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    // See the GNU Lesser General Public License for more details.
    //
    // You should have received a copy of the GNU Lesser General Public License
    // along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
    
    #include "cpp.h"
    
    #ifdef _WIN32
    #include "boinc_win.h"
    #endif
    
    #ifndef _WIN32
    #include "config.h"
    #include <cmath>
    #include <cstdlib>
    #endif
    
    #include "error_numbers.h"
    #include "md5_file.h"
    #include "parse.h"
    #include "str_util.h"
    #include "filesys.h"
    
    #include "log_flags.h"
    #include "file_names.h"
    #include "client_state.h"
    #include "client_types.h"
    #include "client_msgs.h"
    
    using std::vector;
    
    PERS_FILE_XFER::PERS_FILE_XFER() {
        nretry = 0;
        first_request_time = gstate.now;
        next_request_time = first_request_time;
        time_so_far = 0;
        last_bytes_xferred = 0;
        pers_xfer_done = false;
        fip = NULL;
        fxp = NULL;
    }
    
    PERS_FILE_XFER::~PERS_FILE_XFER() {
        if (fip) {
            fip->pers_file_xfer = NULL;
        }
    }
    
    int PERS_FILE_XFER::init(FILE_INFO* f, bool is_file_upload) {
        fxp = NULL;
        fip = f;
        is_upload = is_file_upload;
        pers_xfer_done = false;
        const char* p = f->get_init_url();
        if (!p) {
            msg_printf(NULL, MSG_INTERNAL_ERROR, "No URL for file transfer of %s", f->name);
            return ERR_NULL;
        }