1 /*!
2  * \file
3  *
4  * \brief Source file for UpnpActionComplete methods.
5  *
6  * Do not edit this file, it is automatically generated. Please look at generator.c.
7  *
8  * \author Marcelo Roberto Jimenez
9  */
10 #include "config.h"
11 
12 #include <stdlib.h> /* for calloc(), free() */
13 #include <string.h> /* for strlen(), strdup() */
14 
15 
16 #include "UpnpActionComplete.h"
17 
18 struct s_UpnpActionComplete
19 {
20 	int m_ErrCode;
21 	UpnpString *m_CtrlUrl;
22 	IXML_Document * m_ActionRequest;
23 	IXML_Document * m_ActionResult;
24 };
25 
UpnpActionComplete_new()26 UpnpActionComplete *UpnpActionComplete_new()
27 {
28 	struct s_UpnpActionComplete *p = calloc(1, sizeof (struct s_UpnpActionComplete));
29 
30 	if (!p) return 0;
31 
32 	/*p->m_ErrCode = 0;*/
33 	p->m_CtrlUrl = UpnpString_new();
34 	/*p->m_ActionRequest = 0;*/
35 	/*p->m_ActionResult = 0;*/
36 
37 	return (UpnpActionComplete *)p;
38 }
39 
UpnpActionComplete_delete(UpnpActionComplete * q)40 void UpnpActionComplete_delete(UpnpActionComplete *q)
41 {
42 	struct s_UpnpActionComplete *p = (struct s_UpnpActionComplete *)q;
43 
44 	if (!p) return;
45 
46 	p->m_ActionResult = 0;
47 	p->m_ActionRequest = 0;
48 	UpnpString_delete(p->m_CtrlUrl);
49 	p->m_CtrlUrl = 0;
50 	p->m_ErrCode = 0;
51 
52 	free(p);
53 }
54 
UpnpActionComplete_assign(UpnpActionComplete * p,const UpnpActionComplete * q)55 int UpnpActionComplete_assign(UpnpActionComplete *p, const UpnpActionComplete *q)
56 {
57 	int ok = 1;
58 
59 	if (p != q) {
60 		ok = ok && UpnpActionComplete_set_ErrCode(p, UpnpActionComplete_get_ErrCode(q));
61 		ok = ok && UpnpActionComplete_set_CtrlUrl(p, UpnpActionComplete_get_CtrlUrl(q));
62 		ok = ok && UpnpActionComplete_set_ActionRequest(p, UpnpActionComplete_get_ActionRequest(q));
63 		ok = ok && UpnpActionComplete_set_ActionResult(p, UpnpActionComplete_get_ActionResult(q));
64 	}
65 
66 	return ok;
67 }
68 
UpnpActionComplete_dup(const UpnpActionComplete * q)69 UpnpActionComplete *UpnpActionComplete_dup(const UpnpActionComplete *q)
70 {
71 	UpnpActionComplete *p = UpnpActionComplete_new();
72 
73 	if (!p) return 0;
74 
75 	UpnpActionComplete_assign(p, q);
76 
77 	return p;
78 }
79 
UpnpActionComplete_get_ErrCode(const UpnpActionComplete * p)80 int UpnpActionComplete_get_ErrCode(const UpnpActionComplete *p)
81 {
82 	return p->m_ErrCode;
83 }
84 
UpnpActionComplete_set_ErrCode(UpnpActionComplete * p,int n)85 int UpnpActionComplete_set_ErrCode(UpnpActionComplete *p, int n)
86 {
87 	p->m_ErrCode = n;
88 
89 	return 1;
90 }
91 
UpnpActionComplete_get_CtrlUrl(const UpnpActionComplete * p)92 const UpnpString *UpnpActionComplete_get_CtrlUrl(const UpnpActionComplete *p)
93 {
94 	return p->m_CtrlUrl;
95 }
96 
UpnpActionComplete_set_CtrlUrl(UpnpActionComplete * p,const UpnpString * s)97 int UpnpActionComplete_set_CtrlUrl(UpnpActionComplete *p, const UpnpString *s)
98 {
99 	const char *q = UpnpString_get_String(s);
100 
101 	return UpnpString_set_String(p->m_CtrlUrl, q);
102 }
103 
UpnpActionComplete_get_CtrlUrl_Length(const UpnpActionComplete * p)104 size_t UpnpActionComplete_get_CtrlUrl_Length(const UpnpActionComplete *p)
105 {
106 	return UpnpString_get_Length(UpnpActionComplete_get_CtrlUrl(p));
107 }
108 
UpnpActionComplete_get_CtrlUrl_cstr(const UpnpActionComplete * p)109 const char *UpnpActionComplete_get_CtrlUrl_cstr(const UpnpActionComplete *p)
110 {
111 	return UpnpString_get_String(UpnpActionComplete_get_CtrlUrl(p));
112 }
113 
UpnpActionComplete_strcpy_CtrlUrl(UpnpActionComplete * p,const char * s)114 int UpnpActionComplete_strcpy_CtrlUrl(UpnpActionComplete *p, const char *s)
115 {
116 	return UpnpString_set_String(p->m_CtrlUrl, s);
117 }
118 
UpnpActionComplete_strncpy_CtrlUrl(UpnpActionComplete * p,const char * s,size_t n)119 int UpnpActionComplete_strncpy_CtrlUrl(UpnpActionComplete *p, const char *s, size_t n)
120 {
121 	return UpnpString_set_StringN(p->m_CtrlUrl, s, n);
122 }
123 
UpnpActionComplete_clear_CtrlUrl(UpnpActionComplete * p)124 void UpnpActionComplete_clear_CtrlUrl(UpnpActionComplete *p)
125 {
126 	UpnpString_clear(p->m_CtrlUrl);
127 }
128 
UpnpActionComplete_get_ActionRequest(const UpnpActionComplete * p)129 IXML_Document * UpnpActionComplete_get_ActionRequest(const UpnpActionComplete *p)
130 {
131 	return p->m_ActionRequest;
132 }
133 
UpnpActionComplete_set_ActionRequest(UpnpActionComplete * p,IXML_Document * n)134 int UpnpActionComplete_set_ActionRequest(UpnpActionComplete *p, IXML_Document * n)
135 {
136 	p->m_ActionRequest = n;
137 
138 	return 1;
139 }
140 
UpnpActionComplete_get_ActionResult(const UpnpActionComplete * p)141 IXML_Document * UpnpActionComplete_get_ActionResult(const UpnpActionComplete *p)
142 {
143 	return p->m_ActionResult;
144 }
145 
UpnpActionComplete_set_ActionResult(UpnpActionComplete * p,IXML_Document * n)146 int UpnpActionComplete_set_ActionResult(UpnpActionComplete *p, IXML_Document * n)
147 {
148 	p->m_ActionResult = n;
149 
150 	return 1;
151 }
152 
153