You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
TermApp/app/src/main/cpp/netcamera/netcamera.h

53 lines
1.2 KiB
C++

#include <stdint.h>
#include <vector>
#include <android/multinetwork.h>
#ifndef __NET_CAMERA__
#define __NET_CAMERA__
#define HTTP_AUTH_TYPE_NONE 0
#define HTTP_AUTH_TYPE_BASIC 1
#define HTTP_AUTH_TYPE_DIGEST 2
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__