File: zsconn.h

package info (click to toggle)
mozzemberek 0.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 168 kB
  • ctags: 111
  • sloc: cpp: 686; makefile: 111
file content (43 lines) | stat: -rw-r--r-- 831 bytes parent folder | download
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
/*
  Copyright (c) 2004, TUBITAK/UEKAE

  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.

  Please read the COPYING file.
*/

/*
  ZemberekServer Connection.
*/

#ifndef ZSCONN_H
#define ZSCONN_H

#include "zstring.h"

using namespace std;

class ZSConn
{
public:
    ZSConn();
    ZSConn(char *host, int port);
    ~ZSConn();

    ZString checkString( const string& str, int offset ) const;
    vector<string> getSuggestions (const string& str ) const;
	virtual void init();

private:
    int _conn;
	int port;
	char * host;

    enum Z_CHECK_RESULT spellCheck( const string& str ) const;
    string recvResult() const;
};

#endif