qthighway/examples/appmgrclient/src/appmgrservices.h
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 15 1f895d8a5b2b
equal deleted inserted replaced
1:2b40d63a9c3d 4:90517678cc4f
    36 // Erroneus services
    36 // Erroneus services
    37 #define ERR_IDIAL QLatin1String("xxxx.yyy")
    37 #define ERR_IDIAL QLatin1String("xxxx.yyy")
    38 #define ERR_OPERATION1 QLatin1String("dial(QString,QString)")
    38 #define ERR_OPERATION1 QLatin1String("dial(QString,QString)")
    39 
    39 
    40 
    40 
    41 // QtHighway specific:
    41 // Few dummy metatypes
       
    42 class MetaDummy1
       
    43 {
       
    44     public:
       
    45         MetaDummy1() {};
       
    46         virtual ~MetaDummy1() {};
       
    47 
       
    48         QString mTest;
       
    49         template <typename Stream> void serialize(Stream &stream) const;
       
    50         template <typename Stream> void deserialize(Stream &stream);
       
    51 };
       
    52 
       
    53 template <typename Stream> inline void MetaDummy1::serialize(Stream &s) const
       
    54 {
       
    55     s << mTest;
       
    56 }
       
    57 
       
    58 template <typename Stream> inline void MetaDummy1::deserialize(Stream &s)
       
    59 {
       
    60     s >> mTest;
       
    61 }
       
    62 
       
    63 
       
    64 class MetaDummy2
       
    65 {
       
    66     public:
       
    67         MetaDummy2() {};
       
    68         virtual ~MetaDummy2() {};
       
    69 
       
    70         QString mTest;
       
    71         template <typename Stream> void serialize(Stream &stream) const;
       
    72         template <typename Stream> void deserialize(Stream &stream);
       
    73 };
       
    74 
       
    75 template <typename Stream> inline void MetaDummy2::serialize(Stream &s) const
       
    76 {
       
    77     s << mTest;
       
    78 }
       
    79 
       
    80 template <typename Stream> inline void MetaDummy2::deserialize(Stream &s)
       
    81 {
       
    82     s >> mTest;
       
    83 }
       
    84 
       
    85 Q_DECLARE_USER_METATYPE(MetaDummy1)
       
    86 Q_DECLARE_USER_METATYPE(MetaDummy2)
    42 
    87 
    43 #endif
    88 #endif