diff --git a/src/ndefpclib/bin/Debug/ndefpclib.dll b/src/ndefpclib/bin/Debug/ndefpclib.dll index c729264..8bf4cfb 100644 Binary files a/src/ndefpclib/bin/Debug/ndefpclib.dll and b/src/ndefpclib/bin/Debug/ndefpclib.dll differ diff --git a/src/ndefpclib/bin/Debug/ndefpclib.pdb b/src/ndefpclib/bin/Debug/ndefpclib.pdb index 6de9243..d2cffb1 100644 Binary files a/src/ndefpclib/bin/Debug/ndefpclib.pdb and b/src/ndefpclib/bin/Debug/ndefpclib.pdb differ diff --git a/src/ndefpclib/message/NDEFMessage.cs b/src/ndefpclib/message/NDEFMessage.cs index 599d158..db14feb 100644 --- a/src/ndefpclib/message/NDEFMessage.cs +++ b/src/ndefpclib/message/NDEFMessage.cs @@ -1,6 +1,7 @@ namespace ndefpclib.message { using ndefpclib.records; + using ndefpclib.type; using System.Collections.Generic; using System.IO; @@ -22,7 +23,7 @@ /// The content. /// The type. /// (Optional) the tnf. - public NDEFMessage(string content, TYPEVAL type, NDEFRecord.TNFVAL tnf = NDEFRecord.TNFVAL.WKT) + public NDEFMessage(string content, MsgType.TYPEVAL type, MsgType.TNFVAL tnf = MsgType.TNFVAL.WKT) { this.records = new List(); float recordsCount = (float)content.Length / NDEFRecord.MaxRecordPayLoad; @@ -54,6 +55,12 @@ this.records[this.records.IndexOf(tmpRecord)].ME = NDEFRecord.NDEFFlags.MESET; } + public NDEFMessage(string content, MsgType type) + : this(content, type.TypeValue, type.TNFValue) + { + + } + /// Initializes a new instance of the NDEFMessage class. /// Stubbfel, 21.08.2013. /// The array. @@ -72,39 +79,21 @@ #endregion - #region enum - - /// Values that represent TYPEVAL. - /// Stubbfel, 21.08.2013. - public enum TYPEVAL - { - /// An enum constant representing the empty option. - EMPTY = 0x00, - - /// An enum constant representing the URL option. - URL = 0x55, - - /// An enum constant representing the text option. - TEXT = 0x54, - } - - #endregion - #region Methods /// Gets a praefix. /// Stubbfel, 21.08.2013. /// The type. /// The praefix. - public static string GetPraefix(TYPEVAL type) + public static string GetPraefix(MsgType.TYPEVAL type) { string praefix = string.Empty; switch (type) { - case TYPEVAL.TEXT: + case MsgType.TYPEVAL.TEXT: praefix = "\x02" + "de"; break; - case TYPEVAL.URL: + case MsgType.TYPEVAL.URL: praefix = "\x01"; break; default: diff --git a/src/ndefpclib/ndefpclib.csproj b/src/ndefpclib/ndefpclib.csproj index 9ec5af4..58479f3 100644 --- a/src/ndefpclib/ndefpclib.csproj +++ b/src/ndefpclib/ndefpclib.csproj @@ -41,6 +41,10 @@ + + + +