49 #ifndef PLAYERCC_CLIENTPROXY_H
50 #define PLAYERCC_CLIENTPROXY_H
53 #if defined (PLAYER_STATIC)
54 #define PLAYERCC_EXPORT
55 #elif defined (playerc___EXPORTS)
56 #define PLAYERCC_EXPORT __declspec (dllexport)
58 #define PLAYERCC_EXPORT __declspec (dllimport)
61 #define PLAYERCC_EXPORT
85 #ifdef HAVE_BOOST_SIGNALS
86 typedef boost::signals::connection connection_t;
94 typedef boost::signal<void (void)> read_signal_t;
97 typedef int connection_t;
101 typedef int read_signal_t;
121 virtual void Subscribe(uint32_t ) {};
125 virtual void Unsubscribe() {};
143 T GetVar(
const T &aV)
const
157 void GetVarByRef(
const T aBegin,
const T aEnd, T aDest)
const
160 std::copy(aBegin, aEnd, aDest);
184 read_signal_t mReadSignal;
192 bool IsValid()
const {
return 0!=GetVar(mInfo->datatime); };
197 bool IsFresh()
const {
return GetVar(mFresh); };
211 {
return GetVar(mInfo->datatime) - GetVar(mInfo->lasttime); };
216 uint32_t
GetIndex()
const {
return GetVar(mInfo->addr.index); };
223 {
return interf_to_str(GetVar(mInfo->addr.interf)); };
238 void SetReplaceRule(
bool aReplace,
246 int HasCapability(uint32_t aType, uint32_t aSubtype);
249 int GetBoolProp(
char *aProperty,
bool *aValue);
252 int SetBoolProp(
char *aProperty,
bool aValue);
255 int GetIntProp(
char *aProperty, int32_t *aValue);
258 int SetIntProp(
char *aProperty, int32_t aValue);
261 int GetDblProp(
char *aProperty,
double *aValue);
264 int SetDblProp(
char *aProperty,
double aValue);
267 int GetStrProp(
char *aProperty,
char **aValue);
270 int SetStrProp(
char *aProperty,
char *aValue);
277 #ifdef HAVE_BOOST_SIGNALS
279 return mReadSignal.connect(aSubscriber);
288 #ifdef HAVE_BOOST_SIGNALS
290 aSubscriber.disconnect();
293 aSubscriber = aSubscriber;