zeroconfmessage.h

00001 #ifndef __ZEROCONFMESSAGE_H__
00002 #define __ZEROCONFMESSAGE_H__
00003 
00004 #include <e32base.h>
00005 #include <zeroconf/zeroconfprotocols.h>
00006 
00007 namespace Zeroconf
00008         {
00009 
00010         typedef TBuf8<0x100> TMDnsName;
00011         typedef TBuf8<0x40> TMDnsServiceType;
00012 
00013         enum TZeroconfMessageType
00014                 {
00015                 EZeroconfMessageTypeHost,
00016                 EZeroconfMessageTypeService,
00017                 EZeroconfMessageTypeServiceType
00018                 };
00019                 
00020         enum TZeroconfMessageStatus
00021                 {
00022                 EZeroconfMessageStatusNew,
00023                 EZeroconfMessageStatusUpdated,
00024                 EZeroconfMessageStatusRemoved
00025                 };
00026                 
00035         class TZeroconfMessage
00036                 {
00037         public:
00044                 IMPORT_C TZeroconfMessage();
00045                 
00055                 IMPORT_C TZeroconfMessage(TZeroconfMessageType aType, TZeroconfMessageStatus aStatus, const TDesC8& aName);
00056                 
00068                 IMPORT_C HBufC* NameL() const;
00069                 
00081                 IMPORT_C HBufC* ServiceTypeL() const;
00082                 
00091                 IMPORT_C TZeroconfMessageType Type() const;
00092                 
00101                 IMPORT_C TZeroconfMessageStatus Status() const;
00102                 
00111                 IMPORT_C TServiceProtocol Protocol() const;
00112                 
00120                 IMPORT_C void SetServiceType(const TDesC8& aServiceType);
00121                 
00129                 IMPORT_C void SetServiceProtocol(TServiceProtocol aProtocol);
00130                         
00131         private:
00132                 TZeroconfMessageType iType;
00133                 TZeroconfMessageStatus iStatus;
00134                 TMDnsName iName;
00135                 
00136                 TMDnsServiceType iServiceType;
00137                 TServiceProtocol iServiceProtocol;
00138                 };
00139 
00140 
00141         }
00142         
00143 #endif /* __ZEROCONFMESSAGE_H__ */