MCPcopy Create free account
hub / github.com/JosephP91/curlcpp / curl_form

Class curl_form

include/curl_form.h:43–125  ·  view source on GitHub ↗

* This class simplifies the creation of a form. It wraps all the libcurl * functions used to add content to a form and to destroy it. */

Source from the content-addressed store, hash-verified

41 * functions used to add content to a form and to destroy it.
42 */
43 class curl_form {
44 public:
45 /**
46 * The default constructor will simply initialize the pointers to the
47 * list of form contents.
48 */
49 curl_form();
50 /**
51 * The destructor will free the space allocated for the form content
52 * list.
53 */
54 ~curl_form() NOEXCEPT;
55 /**
56 * Copy constructor used to perform a deep copy of the form content
57 * list. Without it we would not be able to perform the copy.
58 */
59 curl_form(const curl_form &);
60 /**
61 * Assignment operator to implement assignment between two objects
62 * of this class.
63 */
64 curl_form &operator=(const curl_form &);
65 /**
66 * This method allows users to add content to a form, using the
67 * curl_pair class.
68 */
69 void add(const curl_pair<CURLformoption,std::string> &, const curl_pair<CURLformoption,std::string> &);
70 /**
71 * Overloaded add method.
72 */
73 void add(const curl_pair<CURLformoption,std::string> &,
74 const curl_pair<CURLformoption,std::string> &, const curl_pair<CURLformoption,std::string> &);
75 /**
76 * Overloaded add method. It adds another curl_pair object to add more
77 * contents to the form contents list.
78 */
79 void add(const curl_pair<CURLformoption,std::string> &,
80 const curl_pair<CURLformoption,std::string> &, const curl_pair<CURLformoption,int> &);
81 /**
82 * Overloaded add method. It adds another curl_pair object to add more
83 * contents to the form contents list.
84 */
85 void add(const curl_pair<CURLformoption,std::string> &,
86 const curl_pair<CURLformoption,int> &, const curl_pair<CURLformoption,std::string> &);
87 /**
88 * Overloaded add method. It adds another curl_pair object to add more
89 * contents to the form contents list.
90 */
91 void add(const curl_pair<CURLformoption,std::string> &,const curl_pair<CURLformoption,std::string> &,
92 const curl_pair<CURLformoption,int> &, const curl_pair<CURLformoption,std::string> &);
93 /**
94 * Overloaded add method. Used primarily to pass data via CURLFORM_BUFFERPTR.
95 * E.g. first option is content name, second is buffer name,
96 * third is buffer data pointer, fourth is buffer length.
97 */
98 void add(const curl_pair<CURLformoption,std::string> &, const curl_pair<CURLformoption,std::string> &,
99 const curl_pair<CURLformoption, char*> &, const curl_pair<CURLformoption,long> &);
100 /**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected