blob: c15caa3a40784869e545ff75e01c6db752de1bc2 (
plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
/*
motionawayplugin.h
Kopete Motion Detector Auto-Away plugin
Copyright (c) 2002 by Duncan Mac-Vicar Prett <[email protected]>
Contains code from motion.c ( Detect changes in a video stream )
Copyright 2000 by Jeroen Vreeken ([email protected])
Distributed under the GNU public license version 2
See also the file 'COPYING.motion'
Kopete (c) 2002 by the Kopete developers <[email protected]>
*************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
*************************************************************************
*/
#ifndef MOTIONAWAYPLUGIN_H
#define MOTIONAWAYPLUGIN_H
#include "kopeteplugin.h"
class TQTimer;
/**
* @author Duncan Mac-Vicar Prett <[email protected]>
*/
class MotionAwayPlugin : public Kopete::Plugin
{
Q_OBJECT
public:
MotionAwayPlugin( TQObject *parent, const char *name, const TQStringList &args );
~MotionAwayPlugin();
public slots:
void loadSettings();
void slotTimeout();
void slotCapture();
void slotActivity();
private:
int awayTimeout;
bool becomeAvailableWithActivity;
TQString videoDevice;
TQTimer *m_captureTimer;
TQTimer *m_awayTimer;
int getImage(int, TQByteArray& ,int ,int ,int ,int ,int );
bool m_tookFirst;
bool m_wentAway;
int m_width;
int m_height;
int m_quality;
int m_maxChanges;
int m_deviceHandler;
int shots;
int m_gap;
TQByteArray m_imageRef;
TQByteArray m_imageNew;
TQByteArray m_imageOld;
TQByteArray m_imageOut;
/*
time_t currenttimep;
time_t lasttime;
struct tm *currenttime;
char file[255];
char filepath[255];
char c;
*/
};
#endif
// vim: set noet ts=4 sts=4 sw=4:
|