COOLFluiD
Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
cf3
Tools
Prowl
prowl
prowl.h
Go to the documentation of this file.
1
/*
2
* prowl.h
3
* prowl
4
*
5
* Created by J. Dijkstra (abort@digitalise.net) on 29-04-10.
6
* Copyright 2010 Digitalise.NET. All rights reserved.
7
*
8
*/
9
10
#ifndef PROWL_H_
11
#define PROWL_H_
12
13
#define STRICT
14
15
#define SSL_PORT 443
16
#define HOSTNAME "prowl.weks.net"
17
#define MESSAGESIZE 11400
18
#define BUFFERSIZE 512
19
20
/* priorities */
21
#define PROWL_PRIORITY_VERY_LOW -2
22
#define PROWL_PRIORITY_MODERATE -1
23
#define PROWL_PRIORITY_NORMAL 0
24
#define PROWL_PRIORITY_HIGH 1
25
#define PROWL_PRIORITY_EMERGENCY 2
26
27
#ifdef _WINDOWS
28
#define WIN32_LEAN_AND_MEAN
29
30
#include <windows.h>
31
#include <winsock2.h>
32
33
#pragma comment(lib, "ws2_32.lib")
34
#pragma comment(lib, "ssleay32MT.lib")
35
#pragma comment(lib, "libeay32MT.lib")
36
#else
37
#define SOCKET int
38
#define SOCKET_ERROR -1
39
#define closesocket(socket) close(socket)
40
#include <sys/socket.h>
41
#include <netinet/in.h>
42
#include <netdb.h>
43
#include <unistd.h>
44
#endif
45
46
#include <string.h>
47
#include <stdio.h>
48
#include <ctype.h>
49
50
/* openssl headers */
51
#include <openssl/ssl.h>
52
#include <openssl/err.h>
53
54
/* ssl/connection structure */
55
typedef
struct
{
56
SOCKET
socket
;
57
SSL*
ssl_handle
;
58
SSL_CTX*
ssl_context
;
59
}
prowl_connection
;
60
61
int
prowl_push_msg
(
char
* api_key,
int
priority,
char
* application_name,
char
* event_name,
char
* description);
62
63
#endif
prowl_connection
Definition:
prowl.h:55
prowl_connection::ssl_handle
SSL * ssl_handle
Definition:
prowl.h:57
prowl_connection::ssl_context
SSL_CTX * ssl_context
Definition:
prowl.h:58
prowl_connection::socket
SOCKET socket
Definition:
prowl.h:56
prowl_push_msg
int prowl_push_msg(char *api_key, int priority, char *application_name, char *event_name, char *description)
Definition:
prowl.c:20
SOCKET
#define SOCKET
Definition:
prowl.h:37
Generated on Sun Jun 14 2015 21:20:15 for COOLFluiD by
1.8.9.1
Send comments to:
COOLFluiD Web Admin