Audacity 3.2.0
CurlStringList.cpp
Go to the documentation of this file.
1/*!********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 @file CurlStringList.cpp
6 @brief Define a RAII wrapper for the curl_slist.
7
8 Dmitry Vedenko
9 **********************************************************************/
10
11#include "CurlStringList.h"
12
13#include <curl/curl.h>
14
15
16namespace audacity
17{
18namespace network_manager
19{
20
22 : mList (rhs.mList)
23{
24 rhs.mList = nullptr;
25}
26
28{
29 curl_slist_free_all (mList);
30}
31
33{
34 std::swap (mList, rhs.mList);
35 return *this;
36}
37
38void CurlStringList::append (const std::string& string) noexcept
39{
40 mList = curl_slist_append (mList, string.c_str ());
41}
42
43void CurlStringList::append (const char* string) noexcept
44{
45 mList = curl_slist_append (mList, string);
46}
47
48curl_slist* CurlStringList::getCurlList () const noexcept
49{
50 return mList;
51}
52
53}
54}
Declare a RAII wrapper for the curl_slist.
CurlStringList & operator=(CurlStringList &&rhs) noexcept
void append(const std::string &string) noexcept
curl_slist * getCurlList() const noexcept
void swap(std::unique_ptr< Alg_seq > &a, std::unique_ptr< Alg_seq > &b)
Definition: NoteTrack.cpp:634