Revision 5b9fed52 include/RequestManager.h

View differences:

include/RequestManager.h
24 24
#include "VirtualNetworkPool.h"
25 25
#include "ImagePool.h"
26 26
#include "ClusterPool.h"
27
#include "VMTemplatePool.h"
27 28

  
28 29
#include <xmlrpc-c/base.hpp>
29 30
#include <xmlrpc-c/registry.hpp>
......
46 47
        UserPool           *    _upool,
47 48
        ImagePool          *    _ipool,
48 49
        ClusterPool        *    _cpool,
50
        VMTemplatePool     *    _tpool,
49 51
        int                     _port,
50 52
        string                  _xml_log_file)
51 53
            :vmpool(_vmpool),hpool(_hpool),vnpool(_vnpool),upool(_upool),
52
            ipool(_ipool),cpool(_cpool),port(_port),socket_fd(-1),
54
            ipool(_ipool),cpool(_cpool),tpool(_tpool),port(_port),socket_fd(-1),
53 55
            xml_log_file(_xml_log_file)
54 56
    {
55 57
        am.addListener(this);
......
130 132
    ImagePool          *    ipool;
131 133

  
132 134
    /**
133
     *  Pointer to the Image Pool, to access images
135
     *  Pointer to the Cluster Pool, to access clusters
134 136
     */
135 137
    ClusterPool        *    cpool;
136 138

  
137 139
    /**
140
     *  Pointer to the Template Pool, to access templates
141
     */
142
    VMTemplatePool     *    tpool;
143

  
144
    /**
138 145
     *  Port number where the connection will be open
139 146
     */
140 147
    int port;
......
502 509
    };
503 510

  
504 511
    /* ---------------------------------------------------------------------- */
512
    /*                            Template Interface                          */
513
    /* ---------------------------------------------------------------------- */
514

  
515
    class TemplateAllocate: public xmlrpc_c::method
516
    {
517
    public:
518
        TemplateAllocate(
519
            VMTemplatePool * _tpool,
520
            UserPool * _upool):
521
                tpool(_tpool),
522
                upool(_upool)
523
        {
524
            _signature="A:ss";
525
            _help="Allocates a template in the pool";
526
        };
527

  
528
        ~TemplateAllocate(){};
529

  
530
        void execute(
531
            xmlrpc_c::paramList const& paramList,
532
            xmlrpc_c::value *   const  retvalP);
533

  
534
    private:
535
        VMTemplatePool * tpool;
536
        UserPool *       upool;
537
    };
538

  
539
    /* ---------------------------------------------------------------------- */
540

  
541
    class TemplateDelete: public xmlrpc_c::method
542
    {
543
    public:
544
        TemplateDelete(VMTemplatePool * _tpool,
545
                       UserPool *       _upool):
546
                            tpool(_tpool),
547
                            upool(_upool)
548
        {
549
            _signature="A:si";
550
            _help="Deletes a Template";
551
        };
552

  
553
        ~TemplateDelete(){};
554

  
555
        void execute(
556
            xmlrpc_c::paramList const& paramList,
557
            xmlrpc_c::value *   const  retvalP);
558

  
559
    private:
560
        VMTemplatePool * tpool;
561
        UserPool  *      upool;
562
    };
563

  
564
    /* ---------------------------------------------------------------------- */
565

  
566
    class TemplateInfo: public xmlrpc_c::method
567
    {
568
    public:
569
        TemplateInfo(VMTemplatePool * _tpool,
570
                     UserPool *       _upool):
571
                      tpool(_tpool),
572
                      upool(_upool)
573
        {
574
            _signature="A:si";
575
            _help="Returns information for a Template";
576
        };
577

  
578
        ~TemplateInfo(){};
579

  
580
        void execute(
581
            xmlrpc_c::paramList const& paramList,
582
            xmlrpc_c::value *   const  retvalP);
583

  
584
    private:
585
        VMTemplatePool * tpool;
586
        UserPool  *      upool;
587
    };
588

  
589
    /* ---------------------------------------------------------------------- */
590

  
591
    class TemplateUpdate: public xmlrpc_c::method
592
    {
593
    public:
594
        TemplateUpdate(VMTemplatePool * _tpool,
595
                       UserPool *       _upool):
596
                        tpool(_tpool),
597
                        upool(_upool)
598
        {
599
            _signature="A:siss";
600
            _help="Modifies Template attribute";
601
        };
602

  
603
        ~TemplateUpdate(){};
604

  
605
        void execute(
606
            xmlrpc_c::paramList const& paramList,
607
            xmlrpc_c::value *   const  retvalP);
608

  
609
    private:
610
        VMTemplatePool * tpool;
611
        UserPool  *      upool;
612
    };
613

  
614
    /* ---------------------------------------------------------------------- */
615

  
616
    class TemplateRemoveAttribute: public xmlrpc_c::method
617
    {
618
    public:
619
        TemplateRemoveAttribute(VMTemplatePool * _tpool,
620
                             UserPool *          _upool):
621
                        tpool(_tpool),
622
                        upool(_upool)
623
        {
624
            _signature="A:sis";
625
            _help="Removes Template attribute";
626
        };
627

  
628
        ~TemplateRemoveAttribute(){};
629

  
630
        void execute(
631
            xmlrpc_c::paramList const& paramList,
632
            xmlrpc_c::value *   const  retvalP);
633

  
634
    private:
635
        VMTemplatePool * tpool;
636
        UserPool  *      upool;
637
    };
638

  
639
    /* ---------------------------------------------------------------------- */
640

  
641
    class TemplatePublish: public xmlrpc_c::method
642
    {
643
    public:
644
        TemplatePublish(VMTemplatePool * _tpool,
645
                     UserPool *          _upool):
646
                        tpool(_tpool),
647
                        upool(_upool)
648
        {
649
            _signature="A:sib";
650
            _help="Publish/Unpublish the Template";
651
        };
652

  
653
        ~TemplatePublish(){};
654

  
655
        void execute(
656
            xmlrpc_c::paramList const& paramList,
657
            xmlrpc_c::value *   const  retvalP);
658

  
659
    private:
660
        VMTemplatePool * tpool;
661
        UserPool  *      upool;
662
    };
663

  
664
    /* ---------------------------------------------------------------------- */
665

  
666
    class TemplatePoolInfo: public xmlrpc_c::method
667
    {
668
    public:
669
        TemplatePoolInfo(
670
            VMTemplatePool * _tpool,
671
            UserPool * _upool):
672
                tpool(_tpool),
673
                upool(_upool)
674
        {
675
            _signature="A:sii";
676
            _help="Returns the template pool";
677
        };
678

  
679
        ~TemplatePoolInfo(){};
680

  
681
        void execute(
682
            xmlrpc_c::paramList const& paramList,
683
            xmlrpc_c::value *   const  retvalP);
684

  
685
    private:
686
        VMTemplatePool * tpool;
687
        UserPool *       upool;
688
    };
689

  
690
    /* ---------------------------------------------------------------------- */
505 691
    /*                            Host Interface                              */
506 692
    /* ---------------------------------------------------------------------- */
507 693

  

Also available in: Unified diff