Switch to unified view

a b/src/DIF/FA/FAIBase.h
1
//
2
// This program is free software: you can redistribute it and/or modify
3
// it under the terms of the GNU Lesser General Public License as published by
4
// the Free Software Foundation, either version 3 of the License, or
5
// (at your option) any later version.
6
// 
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
// GNU Lesser General Public License for more details.
11
// 
12
// You should have received a copy of the GNU Lesser General Public License
13
// along with this program.  If not, see http://www.gnu.org/licenses/.
14
// 
15
16
#ifndef FAIBASE_H_
17
#define FAIBASE_H_
18
19
//Standard libraries
20
#include <omnetpp.h>
21
//RINASim libraries
22
#include "Flow.h"
23
24
class FAIBase : public cSimpleModule {
25
  public:
26
    FAIBase();
27
    virtual ~FAIBase();
28
29
    virtual bool receiveAllocateRequest() = 0;
30
    virtual bool processDegenerateDataTransfer() = 0;
31
    virtual bool receiveAllocateResponsePositive() = 0;
32
    virtual void receiveAllocateResponseNegative() = 0;
33
    virtual bool receiveCreateRequest() = 0;
34
    virtual bool receiveCreateResponsePositive(Flow* flow) = 0;
35
    virtual bool receiveCreateResponseNegative(Flow* flow) = 0;
36
    virtual bool receiveDeallocateRequest() = 0;
37
    virtual void receiveDeleteRequest() = 0;
38
    virtual void receiveDeleteResponse() = 0;
39
40
    virtual void receiveCreateFlowResponsePositiveFromNminusOne() = 0;
41
    virtual void receiveCreateFlowResponseNegativeFromNminusOne() = 0;
42
43
44
    Flow* getFlow()  {
45
        return FlowObject;
46
    }
47
48
  protected:
49
    Flow* FlowObject;
50
51
    //SimpleModule overloads
52
    virtual void initialize() = 0;
53
    virtual void handleMessage(cMessage *msg) = 0;
54
55
56
};
57
58
#endif /* FAIBASE_H_ */