Merge commit '02ac4020d3f7a948c87dd0349db093934c0aed3c' into picloud

This commit is contained in:
2020-06-18 19:09:21 +03:00
7 changed files with 51 additions and 14 deletions

View File

@@ -237,15 +237,14 @@
if (pid == 0) return; \
uint id = __classNameIDS(); \
PIMutexLocker ml(__meta_mutex()); \
__meta_data()[pid]; \
__MetaData & eh(__meta_data()[id]); \
if (eh.scope_id.contains(pid)) return; \
__MetaData & ehp(__meta_data()[pid]); \
__MetaData ehp(__meta_data().value(pid)); \
eh.eh_set << ehp.eh_set; \
eh.eh_func << ehp.eh_func; \
eh.scope_id = ehp.scope_id; \
eh.scope_list = ehp.scope_list; \
eh.addScope(PIStringAscii(#name), pid); \
eh.addScope(__classNameS(), id); \
} \
}; \
__ParentInitializer__ __parent_init__; \

View File

@@ -43,8 +43,8 @@ typedef bool (*ReadRetFunc)(void * , uchar * , int );
#else
# define REGISTER_DEVICE(class) ADD_NEW_TO_COLLECTION_WITH_NAME(__PIIODevices__, class, __S__collection_##class##__)
# define PIIODEVICE(class) PIOBJECT_SUBCLASS(class, PIIODevice) PIIODevice * copy() const {return new class();}
# define REGISTER_DEVICE(name) ADD_NEW_TO_COLLECTION_WITH_NAME(__PIIODevices__, name, __S__collection_##name##__)
# define PIIODEVICE(name) PIOBJECT_SUBCLASS(name, PIIODevice) PIIODevice * copy() const {return new name();}
#endif

View File

@@ -31,27 +31,27 @@ public:
~PIEthUtilBase();
//! Set crypt layer enabled
void setCryptEnabled(bool on) {_crypt = on;}
void setCryptEnabled(bool on);
//! Enable crypt layer
void cryptEnable() {setCryptEnabled(true);}
void cryptEnable();
//! Disable crypt layer
void cryptDisable() {setCryptEnabled(false);}
void cryptDisable();
//! Returns if crypt layer enabled
bool isCryptEnabled() const {return _crypt;}
bool isCryptEnabled() const;
//! Set crypt layer key to \"k\"
void setCryptKey(const PIByteArray & k) {_key = k;}
void setCryptKey(const PIByteArray & k);
//! Generate crypt layer key by \a PICrypt::hash and
//! set crypt layer enabled
void createCryptKey(const PIString & k);
//! Returns crypt layer key
PIByteArray cryptKey() const {return _key;}
PIByteArray cryptKey() const;
protected: