front_idill/extern/fajran-npTuioClient/src/plugin.h
author bastiena
Fri, 06 Apr 2012 10:44:54 +0200
changeset 21 e4e5f02787a1
child 28 9ccef81f02ab
permissions -rw-r--r--
Front IDILL : Added Communication extern named fajran-npTuioClient It contains the project generating a dll used as a browser plugin.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     1
// 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     2
//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     3
// 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     4
// This program is free software; you can redistribute it and/or modify
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     5
// it under the terms of the GNU General Public License as published by
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     6
// the Free Software Foundation; either version 3 of the License, or
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     7
// (at your option) any later version.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     8
// 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     9
// This program is distributed in the hope that it will be useful,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    12
// GNU General Public License for more details.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    13
// 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    14
// You should have received a copy of the GNU General Public License
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    15
// along with this program; if not, write to the Free Software
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    16
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    17
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    18
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    19
#ifndef PLUGIN_H
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    20
#define PLUGIN_H
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    21
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    22
#include "pluginbase.h"
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    23
#include "client.h"
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    24
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    25
#include <string>
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    26
#include <map>
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    27
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    28
extern NPBool      plugInitialized;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    29
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    30
class nsPluginInstance : public nsPluginInstanceBase
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    31
{
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    32
public:
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    33
    nsPluginInstance(nsPluginCreateData* );
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    34
    virtual ~nsPluginInstance();
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    35
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    36
    // We are required to implement these three methods.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    37
    NPBool init(NPWindow *aWindow);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    38
    NPBool isInitialized() { return plugInitialized; }
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    39
    void shut();
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    40
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    41
    NPError GetValue(NPPVariable variable, void *value);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    42
    NPError SetWindow(NPWindow *aWindow);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    43
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    44
    NPError NewStream(NPMIMEType type, NPStream *stream, NPBool seekable,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    45
                      uint16 *stype);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    46
    NPError DestroyStream(NPStream * stream, NPError reason);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    47
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    48
    int32_t WriteReady(NPStream *stream);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    49
    int32_t Write(NPStream *stream, int32_t offset, int32_t len, void *buffer);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    50
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    51
    NPError WriteStatus(const char *msg) const;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    52
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    53
	void event(TuioEventData);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    54
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    55
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    56
private:
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    57
    NPP         _instance;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    58
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    59
	int         _port;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    60
	std::string _callback;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    61
};
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    62
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    63
// end of __PLUGIN_H__
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    64
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    65
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    66
// Local Variables:
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    67
// mode: C++
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    68
// End: