Growl Client Interface.
Copyright (c) 2016-2018 Microchip Technology Inc. and its subsidiaries.
#include "common/include/nm_common.h"
Macros | |
#define | GROWL_APPNAME_MAX_LENGTH 16 |
#define | GROWL_DESCRIPTION_MAX_LENGTH 72 |
#define | GROWL_ERR_API_EXCEED 46 |
#define | GROWL_ERR_BAD_REQUEST 40 |
#define | GROWL_ERR_CONN_FAILED 10 /*AFTER NUMBER OF ITERATION*/ |
#define | GROWL_ERR_LOCAL_ERROR 30 |
#define | GROWL_ERR_NOT_ACCEPTED 42 |
#define | GROWL_ERR_NOT_APPROVED 49 |
#define | GROWL_ERR_NOT_AUTHORIZED 41 |
#define | GROWL_ERR_RESOLVE_DNS 11 |
#define | GROWL_ERR_SERVER_ERROR 50 |
#define | GROWL_EVENT_MAX_LENGTH 16 |
#define | GROWL_RETRY 12 |
#define | GROWL_SUCCESS 20 |
#define | NMA_CLIENT 2 |
#define | PROWL_CLIENT 1 |
Functions | |
NMI_API void | GrowlCb (uint8 u8Code, uint8 u8ClientID) |
NMI_API void | NMI_GrowldeInit (void) |
NMI_API void | NMI_GrowlInit (uint8 *pu8PrwKey, uint8 *pu8NmaKey) |
NMI_API sint8 | NMI_GrowlSendNotification (uint8 u8ClientName, uint8 *pu8App, uint8 *pu8Event, uint8 *pu8Description, uint8 bUseSSL) |
#define GROWL_APPNAME_MAX_LENGTH 16 |
Referenced by NMI_GrowlSendNotification().
#define GROWL_DESCRIPTION_MAX_LENGTH 72 |
Referenced by GROWL_APPSocketEventHandler(), and NMI_GrowlSendNotification().
#define GROWL_ERR_API_EXCEED 46 |
Actual returned code = "4069".
#define GROWL_ERR_BAD_REQUEST 40 |
The sent notification has a format error. Actual returned code = "400".
#define GROWL_ERR_CONN_FAILED 10 /*AFTER NUMBER OF ITERATION*/ |
Referenced by GROWL_APPSocketEventHandler().
#define GROWL_ERR_LOCAL_ERROR 30 |
An error occured on the m2m device due to internal problem.
#define GROWL_ERR_NOT_ACCEPTED 42 |
Maximum number of API calls per hour exceeded. Actual returned code = "402".
#define GROWL_ERR_NOT_APPROVED 49 |
Actual returned code = "409".
#define GROWL_ERR_NOT_AUTHORIZED 41 |
The API Key supplied with the request is invalid. Actual returned code = "401".
#define GROWL_ERR_RESOLVE_DNS 11 |
Referenced by AppServerCb().
#define GROWL_ERR_SERVER_ERROR 50 |
Internal server error. Actual returned code = "500".
#define GROWL_EVENT_MAX_LENGTH 16 |
Referenced by NMI_GrowlSendNotification().
#define GROWL_RETRY 12 |
#define GROWL_SUCCESS 20 |
NMA notification sent successfully. Actual returned code = "200".
#define NMA_CLIENT 2 |
Referenced by AppServerCb(), FormatMsg(), GROWL_APPSocketEventHandler(), growl_send_message_handler(), and NMI_GrowlSendNotification().
#define PROWL_CLIENT 1 |
Referenced by AppServerCb(), FormatMsg(), GROWL_APPSocketEventHandler(), and NMI_GrowlSendNotification().
NMI_API void NMI_GrowldeInit | ( | void | ) |
References close(), m2m_memset(), and tstrNotification::Socket.
References AppServerCb(), gau8NmaKey, gau8PrwKey, GROWL_APPSocketEventHandler(), M2M_INFO, m2m_memset(), registerSocketCallback(), tstrNotification::Socket, and socketInit().
Referenced by wifi_cb().
NMI_API sint8 NMI_GrowlSendNotification | ( | uint8 | u8ClientName, |
uint8 * | pu8App, | ||
uint8 * | pu8Event, | ||
uint8 * | pu8Description, | ||
uint8 | bUseSSL | ||
) |
References AF_INET, gau8NmaKey, gau8PrwKey, gethostbyname(), GROWL_APPNAME_MAX_LENGTH, GROWL_DESCRIPTION_MAX_LENGTH, GROWL_EVENT_MAX_LENGTH, GROWL_HTTP_PORT, GROWL_HTTPS_PORT, GROWL_STATE_IDLE, GROWL_STATE_REQ_PENDING, M2M_ERR, M2M_ERR_FAIL, M2M_INFO, m2m_strlen(), NMA_CLIENT, NMA_DOMAIN_NAME, NULL, PROWL_CLIENT, PROWL_DOMAIN_NAME, tstrNotification::pu8App, tstrNotification::pu8Event, tstrNotification::pu8Msg, SOCK_STREAM, tstrNotification::Socket, socket(), SOCKET_FLAGS_SSL, tstrNotification::u16Port, and tstrNotification::u8State.
Referenced by growl_send_message_handler().