~ubuntu-branches/ubuntu/wily/aria2/wily-proposed

« back to all changes in this revision

Viewing changes to src/HttpRequestConnectChain.h

  • Committer: Package Import Robot
  • Author(s): Kartik Mistry, Kartik Mistry, Patrick Ruckstuhl
  • Date: 2013-09-22 18:52:14 UTC
  • mfrom: (2.5.19 sid)
  • Revision ID: package-import@ubuntu.com-20130922185214-upeu2ljgeqi7e7oo
Tags: 1.18.0-1
[ Kartik Mistry ]
* New upstream release.
* debian/control:
  + (really) Set priority to optional from extra (Closes: #697659).
  + wrap-and-sort some fields.

[ Patrick Ruckstuhl ]
* debian/rules:
  + Allow parallel building (Closes: #720977)
* debian/tests, debian/control:
  + autopkgtest infrastructure

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
struct HttpRequestConnectChain : public ControlChain<ConnectCommand*> {
48
48
  HttpRequestConnectChain() {}
49
49
  virtual ~HttpRequestConnectChain() {}
50
 
  virtual int run(ConnectCommand* t, DownloadEngine* e)
 
50
  virtual int run(ConnectCommand* t, DownloadEngine* e) CXX11_OVERRIDE
51
51
  {
52
 
    SharedHandle<SocketRecvBuffer> socketRecvBuffer
 
52
    std::shared_ptr<SocketRecvBuffer> socketRecvBuffer
53
53
      (new SocketRecvBuffer(t->getSocket()));
54
 
    SharedHandle<HttpConnection> httpConnection
 
54
    std::shared_ptr<HttpConnection> httpConnection
55
55
      (new HttpConnection(t->getCuid(), t->getSocket(), socketRecvBuffer));
56
 
    HttpRequestCommand* c = new HttpRequestCommand(t->getCuid(),
57
 
                                                   t->getRequest(),
58
 
                                                   t->getFileEntry(),
59
 
                                                   t->getRequestGroup(),
60
 
                                                   httpConnection,
61
 
                                                   e,
62
 
                                                   t->getSocket());
 
56
    auto c = make_unique<HttpRequestCommand>(t->getCuid(),
 
57
                                             t->getRequest(),
 
58
                                             t->getFileEntry(),
 
59
                                             t->getRequestGroup(),
 
60
                                             httpConnection,
 
61
                                             e,
 
62
                                             t->getSocket());
63
63
    c->setProxyRequest(t->getProxyRequest());
64
64
    c->setStatus(Command::STATUS_ONESHOT_REALTIME);
65
65
    e->setNoWait(true);
66
 
    e->addCommand(c);
 
66
    e->addCommand(std::move(c));
67
67
    return 0;
68
68
  }
69
69
};