summaryrefslogtreecommitdiff
path: root/cpp/demo/IceStorm/counter/CounterI.h
blob: 2dde122b6a212901c2d890ce569c7071f6aee851 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// **********************************************************************
//
// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

#ifndef COUNTER_I_H
#define COUNTER_I_H

#include <IceStorm/IceStorm.h>
#include <Counter.h>

class CounterI : public Demo::Counter, public IceUtil::Mutex
{
public:

    CounterI(const IceStorm::TopicPrx&);

    virtual void subscribe(const Demo::CounterObserverPrx& observer, const Ice::Current&);
    virtual void unsubscribe(const Demo::CounterObserverPrx& observer, const Ice::Current&);
    virtual void inc(int value, const Ice::Current&);

private:

    int _value;
    IceStorm::TopicPrx _topic;
    Demo::CounterObserverPrx _publisher;
};

#endif