Merge branch 'main' of http://61.169.135.146:8081/git/xymp/TermApp
commit
1728e08f7a
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,22 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <net/if.h>
|
||||
#include <bits/ioctl.h>
|
||||
|
||||
#include <android/multinetwork.h>
|
||||
|
||||
#ifndef __HTTP_CLIENT__
|
||||
#define __HTTP_CLIENT__
|
||||
|
||||
|
||||
bool setIPAddress(const char *if_name, const char *ip_addr, const char *net_mask, const char *gateway_addr);
|
||||
int DoGetRequest(const char* url, const char* userName, const char* password, net_handle_t netHandle, std::vector<uint8_t>& data);
|
||||
int DoPutRequest(const char* url, const char* userName, const char* password, net_handle_t netHandle, const char* contents, std::vector<uint8_t>& data);
|
||||
|
||||
#endif // __HTTP_CLIENT__
|
@ -0,0 +1,50 @@
|
||||
#include <stdint.h>
|
||||
#include <vector>
|
||||
#include <android/multinetwork.h>
|
||||
|
||||
#ifndef __NET_CAMERA__
|
||||
#define __NET_CAMERA__
|
||||
|
||||
|
||||
struct NET_PHOTO_INFO
|
||||
{
|
||||
net_handle_t netHandle;
|
||||
unsigned char authType; // 0, 1
|
||||
unsigned char reserved[7]; // for memory alignment
|
||||
char ip[24];
|
||||
char userName[8];
|
||||
char password[16];
|
||||
char url[128];
|
||||
char outputPath[128];
|
||||
};
|
||||
|
||||
/*
|
||||
struct NET_PHOTO_INFO
|
||||
{
|
||||
std::string ip;
|
||||
std::string userName;
|
||||
std::string password;
|
||||
std::string interface;
|
||||
std::string url;
|
||||
std::string outputPath;
|
||||
unsigned char authType; // 0, 1
|
||||
unsigned char reserved[7]; // for memory alignment
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
bool requestCapture(uint8_t channel, uint8_t preset, const NET_PHOTO_INFO& photoInfo);
|
||||
bool requestCapture(uint8_t channel, uint8_t preset, const NET_PHOTO_INFO& photoInfo, std::vector<uint8_t>& img);
|
||||
|
||||
namespace nc_hk
|
||||
{
|
||||
bool requestCapture(uint8_t channel, uint8_t preset, const NET_PHOTO_INFO& photoInfo, std::vector<uint8_t>& img);
|
||||
}
|
||||
|
||||
|
||||
namespace nc_ys
|
||||
{
|
||||
bool requestCapture(uint8_t channel, uint8_t preset, const NET_PHOTO_INFO& photoInfo, std::vector<uint8_t>& img);
|
||||
}
|
||||
|
||||
#endif // __NET_CAMERA__
|
Loading…
Reference in New Issue