fujuntang
2022-04-28 51ccd8155f029d66366d0df8e2baf886ffd50000
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "proto_comm.h"
#include "proto_dbg.h"
 
/*enumming the devices informations*/
int proto_GetDeviceInformation(const char *DeviceXAddr, const char *username, const char *passwd)
{
    int result = 0;
    struct soap *soap = NULL;
    struct _tds__GetDeviceInformation           req;
    struct _tds__GetDeviceInformationResponse   rep;
 
    SOAP_ASSERT(NULL != DeviceXAddr);
    SOAP_ASSERT(NULL != (soap = proto_soap_new(SOAP_SOCK_TIMEOUT)));
 
    proto_SetAuthInfo(soap, username, passwd);
 
    memset(&req, 0x00, sizeof(req));
    memset(&rep, 0x00, sizeof(rep));
    result = soap_call___tds__GetDeviceInformation(soap, DeviceXAddr, NULL, &req, &rep);
    SOAP_CHECK_ERROR(result, soap, "GetDeviceInformation");
 
    dump_tds__GetDeviceInformationResponse(&rep);
 
EXIT:
 
    if (NULL != soap) {
        proto_soap_delete(soap);
    }
 
    return result;
}