Revision ae53d437 include/RequestManager.h

View differences:

include/RequestManager.h
25 25
#include "ImagePool.h"
26 26
#include "ClusterPool.h"
27 27
#include "VMTemplatePool.h"
28
#include "GroupPool.h"
28 29

  
29 30
#include <xmlrpc-c/base.hpp>
30 31
#include <xmlrpc-c/registry.hpp>
......
48 49
        ImagePool          *    _ipool,
49 50
        ClusterPool        *    _cpool,
50 51
        VMTemplatePool     *    _tpool,
52
        GroupPool          *    _gpool,
51 53
        int                     _port,
52 54
        string                  _xml_log_file)
53 55
            :vmpool(_vmpool),hpool(_hpool),vnpool(_vnpool),upool(_upool),
54
            ipool(_ipool),cpool(_cpool),tpool(_tpool),port(_port),socket_fd(-1),
55
            xml_log_file(_xml_log_file)
56
            ipool(_ipool),cpool(_cpool),tpool(_tpool),gpool(_gpool),port(_port),
57
            socket_fd(-1),xml_log_file(_xml_log_file)
56 58
    {
57 59
        am.addListener(this);
58 60
    };
......
142 144
    VMTemplatePool     *    tpool;
143 145

  
144 146
    /**
147
     *  Pointer to the Group Pool, to access groups
148
     */
149
    GroupPool          *    gpool;
150

  
151
    /**
145 152
     *  Port number where the connection will be open
146 153
     */
147 154
    int port;
......
988 995

  
989 996

  
990 997
    /* ---------------------------------------------------------------------- */
998
    /*                      Group Interface                                   */
999
    /* ---------------------------------------------------------------------- */
1000

  
1001
    class GroupAllocate: public xmlrpc_c::method
1002
    {
1003
    public:
1004
        GroupAllocate(
1005
            UserPool *      _upool,
1006
            GroupPool *     _gpool):
1007
                upool(_upool),
1008
                gpool(_gpool)
1009
        {
1010
            _signature="A:ss";
1011
            _help="Allocates a group in the pool";
1012
        };
1013

  
1014
        ~GroupAllocate(){};
1015

  
1016
        void execute(
1017
            xmlrpc_c::paramList const& paramList,
1018
            xmlrpc_c::value *   const  retvalP);
1019

  
1020
    private:
1021
        UserPool *      upool;
1022
        GroupPool *     gpool;
1023
    };
1024

  
1025
    /* ---------------------------------------------------------------------- */
1026

  
1027
    class GroupInfo: public xmlrpc_c::method
1028
    {
1029
    public:
1030
        GroupInfo(
1031
            UserPool *      _upool,
1032
            GroupPool *     _gpool):
1033
                upool(_upool),
1034
                gpool(_gpool)
1035
        {
1036
            _signature="A:si";
1037
            _help="Returns group information";
1038
        };
1039

  
1040
        ~GroupInfo(){};
1041

  
1042
        void execute(
1043
            xmlrpc_c::paramList const& paramList,
1044
            xmlrpc_c::value *   const  retvalP);
1045

  
1046
    private:
1047
        UserPool *      upool;
1048
        GroupPool *     gpool;
1049
    };
1050

  
1051
    /* ---------------------------------------------------------------------- */
1052

  
1053
    class GroupDelete: public xmlrpc_c::method
1054
    {
1055
    public:
1056
        GroupDelete(
1057
            UserPool *      _upool,
1058
            GroupPool *     _gpool):
1059
                upool(_upool),
1060
                gpool(_gpool)
1061
        {
1062
            _signature="A:si";
1063
            _help="Deletes a group from the pool";
1064
        };
1065

  
1066
        ~GroupDelete(){};
1067

  
1068
        void execute(
1069
            xmlrpc_c::paramList const& paramList,
1070
            xmlrpc_c::value *   const  retvalP);
1071

  
1072
    private:
1073
        UserPool *      upool;
1074
        GroupPool *     gpool;
1075
    };
1076

  
1077
    /* ---------------------------------------------------------------------- */
1078

  
1079
    class GroupPoolInfo: public xmlrpc_c::method
1080
    {
1081
    public:
1082
        GroupPoolInfo(
1083
            UserPool *      _upool,
1084
            GroupPool *     _gpool):
1085
                upool(_upool),
1086
                gpool(_gpool)
1087
        {
1088
            _signature="A:s";
1089
            _help="Returns the group pool information";
1090
        };
1091

  
1092
        ~GroupPoolInfo(){};
1093

  
1094
        void execute(
1095
            xmlrpc_c::paramList const& paramList,
1096
            xmlrpc_c::value *   const  retvalP);
1097

  
1098
    private:
1099
        UserPool *      upool;
1100
        GroupPool *     gpool;
1101
    };
1102

  
1103

  
1104
    /* ---------------------------------------------------------------------- */
991 1105
    /*                      Virtual Network Interface                         */
992 1106
    /* ---------------------------------------------------------------------- */
993 1107

  

Also available in: Unified diff