aboutsummaryrefslogtreecommitdiff
path: root/src/programlink.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/programlink.cpp')
-rw-r--r--src/programlink.cpp71
1 files changed, 71 insertions, 0 deletions
diff --git a/src/programlink.cpp b/src/programlink.cpp
new file mode 100644
index 0000000..de13be8
--- /dev/null
+++ b/src/programlink.cpp
@@ -0,0 +1,71 @@
1/***************************************************************************
2 programlink.cpp - description
3 -------------------
4 begin : Sat Sep 6 2003
5 copyright : (C) 2003 by Mike Buland
6 email : eichlan@yf-soft.com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#include "programlink.h"
19#include "programchain.h"
20
21ProgramLink::ProgramLink()
22{
23}
24
25ProgramLink::~ProgramLink()
26{
27}
28
29LinkMessage *ProgramLink::sendIRM( LinkMessage *pMsgOut )
30{
31 return pChain->broadcastIRM( pMsgOut, this );
32}
33
34void ProgramLink::setChain( ProgramChain *pNewChain )
35{
36 pChain = pNewChain;
37}
38
39/*
40void ProgramLink::postMessage( LinkMessage *pMsg, int nLvl )
41{
42 if( nLvl == msgToChain )
43 {
44 qMsgToChain.enqueue( pMsg );
45 }
46 else if( nLvl == msgToLink )
47 {
48 qMsgToLink.enqueue( pMsg );
49 }
50 else
51 {
52 // ERROR!
53 }
54}
55
56LinkMessage *ProgramLink::getMessage( int nLvl )
57{
58 if( nLvl == msgToChain )
59 {
60 return (LinkMessage *)qMsgToChain.dequeue();
61 }
62 else if( nLvl == msgToLink )
63 {
64 return (LinkMessage *)qMsgToLink.dequeue();
65 }
66 else
67 {
68 // ERROR!
69 }
70}
71*/