UPnPsdk 0.1
Universal Plug and Play +, Software Development Kit
 
Loading...
Searching...
No Matches
UpnpActionComplete.cpp
Go to the documentation of this file.
1// Copyright (C) 2022+ GPL 3 and higher by Ingo Höft, <Ingo@Hoeft-online.de>
2// Redistribution only with this Copyright remark. Last modified: 2024-03-03
3// Also Copyright by other contributor as noted below.
10
11#include <stdlib.h> /* for calloc(), free() */
12#include <string.h> /* for strlen(), strdup() */
13
21
23 struct s_UpnpActionComplete* p =
24 (s_UpnpActionComplete*)calloc(1, sizeof(struct s_UpnpActionComplete));
25
26 if (!p)
27 return 0;
28
29 /*p->m_ErrCode = 0;*/
31 /*p->m_ActionRequest = 0;*/
32 /*p->m_ActionResult = 0;*/
33
34 return (UpnpActionComplete*)p;
35}
36
38 struct s_UpnpActionComplete* p = (struct s_UpnpActionComplete*)q;
39
40 if (!p)
41 return;
42
43 p->m_ActionResult = 0;
44 p->m_ActionRequest = 0;
46 p->m_CtrlUrl = 0;
47 p->m_ErrCode = 0;
48
49 free(p);
50}
51
69
72
73 if (!p)
74 return 0;
75
77
78 return p;
79}
80
84
86 p->m_ErrCode = n;
87
88 return 1;
89}
90
94
100
104
108
112
114 size_t n) {
115 return UpnpString_set_StringN(p->m_CtrlUrl, s, n);
116}
117
121
126
133
138
140 IXML_Document* n) {
141 p->m_ActionResult = n;
142
143 return 1;
144}
int UpnpActionComplete_strcpy_CtrlUrl(UpnpActionComplete *p, const char *s)
IXML_Document * UpnpActionComplete_get_ActionRequest(const UpnpActionComplete *p)
UpnpString * m_CtrlUrl
CtrlUrl.
int UpnpActionComplete_set_ActionRequest(UpnpActionComplete *p, IXML_Document *n)
const char * UpnpActionComplete_get_CtrlUrl_cstr(const UpnpActionComplete *p)
UpnpActionComplete * UpnpActionComplete_dup(const UpnpActionComplete *q)
const UpnpString * UpnpActionComplete_get_CtrlUrl(const UpnpActionComplete *p)
IXML_Document * UpnpActionComplete_get_ActionResult(const UpnpActionComplete *p)
int UpnpActionComplete_set_ErrCode(UpnpActionComplete *p, int n)
int UpnpActionComplete_strncpy_CtrlUrl(UpnpActionComplete *p, const char *s, size_t n)
int UpnpActionComplete_set_ActionResult(UpnpActionComplete *p, IXML_Document *n)
int UpnpActionComplete_set_CtrlUrl(UpnpActionComplete *p, const UpnpString *s)
int UpnpActionComplete_get_ErrCode(const UpnpActionComplete *p)
void UpnpActionComplete_clear_CtrlUrl(UpnpActionComplete *p)
void UpnpActionComplete_delete(UpnpActionComplete *q)
UpnpActionComplete * UpnpActionComplete_new()
IXML_Document * m_ActionResult
m_ActionResult
size_t UpnpActionComplete_get_CtrlUrl_Length(const UpnpActionComplete *p)
int UpnpActionComplete_assign(UpnpActionComplete *p, const UpnpActionComplete *q)
IXML_Document * m_ActionRequest
m_ActionRequest
UpnpActionComplete.
Header file for UpnpActionComplete methods.
Internal implementation of the class UpnpString.
PUPNP_Api int UpnpString_set_StringN(UpnpString *p, const char *s, size_t n)
Sets the string from a pointer to char using a maximum of N chars.
PUPNP_Api int UpnpString_set_String(UpnpString *p, const char *s)
Sets the string from a pointer to char.
PUPNP_Api size_t UpnpString_get_Length(const UpnpString *p)
Returns the length of the string.
PUPNP_Api UpnpString * UpnpString_new(void)
Constructor.
PUPNP_Api const char * UpnpString_get_String(const UpnpString *p)
Returns the pointer to char.
PUPNP_Api void UpnpString_delete(UpnpString *p)
Destructor.
PUPNP_Api void UpnpString_clear(UpnpString *p)
Clears the string, sets its size to zero.
Data structure representing the DOM Document.
Definition ixml.hpp:155