First commit of release 0.1
[sockstream.git] / include / service.h
1 /**************************************************************************
2 **  (c) Copyright 2012, Andromeda Technology & Automation
3 ***************************************************************************
4 ** MODULE INFORMATION *
5 ***********************
6 **      FILE NAME      : service.h
7 **      SYSTEM NAME    : Network and socket classes
8 **      VERSION NUMBER : 0.1
9 **
10 **  DESCRIPTION      :  Service class definition
11 **
12 **  EXPORTED OBJECTS : class Service
13 **  LOCAL    OBJECTS : 
14 **  MODULES  USED    :
15 ***************************************************************************
16 **  ADMINISTRATIVE INFORMATION *
17 ********************************
18 **      ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
19 **      CREATION DATE   : Mar 02, 2012
20 **      LAST UPDATE     : Mar 07, 2012
21 **      MODIFICATIONS   : 
22 **************************************************************************/
23
24 #include <list>
25 #include <netdb.h>
26 #include <AXE/String.h>
27 #include "port.h"
28
29 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
30 **  NAME           : Service - A class to find services and ports
31 **  MEMBERS        : name      : The name of the service.
32 **                   ports     : The port numbers on which the service can be reached.
33 **  OPERATORS      : None
34 **  METHODS        : FindAddress() : Find all port numbers.
35 **                   FindName()    : Find the name if the port in known.
36 **
37 **  DESCRIPTION    : 
38 **
39 **
40 **  RELATIONS      : 
41 **  SEE ALSO       : getaddrinfo(3), getnameinfo()
42 **  LAST MODIFIED  : Mar 07, 2012
43 **+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
44 */
45
46 class Service
47 {
48    String name;
49    std::list<Port> ports;
50
51 public:
52
53    Service(String servname)
54    {
55       name = servname;
56    }
57
58    String FindName();
59    std::list<Port> FindAddress();
60
61 };