Skip to content

Commit

Permalink
Some changes in file structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan130200 committed May 7, 2024
1 parent 14bc7a5 commit 298e3d5
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 9 deletions.
5 changes: 5 additions & 0 deletions XmppSharp.Expat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# XMPP# Expat
This package implements the Expat parser in Xmpp Sharp library.

# Common Types
- `ExpatXmppParser`
4 changes: 2 additions & 2 deletions XmppSharp.Expat/ExpatXmppParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace XmppSharp.Parsers;

/// <summary>
/// An enhanced XMPP parser built using libexpat features.
/// An enhanced XMPP parser built using Expat library.
/// </summary>
public class ExpatXmppParser : BaseXmppParser
{
Expand All @@ -29,7 +29,7 @@ public ExpatXmppParser(ExpatEncodingType encoding = ExpatEncodingType.Utf8)
else
e.Attributes.TryGetValue("xmlns", out ns);
if (e.Name is "iq" or "message" or "presence")
if (e.Name is "iq" or "message" or "presence") // work-around
ns ??= Namespace.Client;
var element = ElementFactory.Create(e.Name, ns);
Expand Down
13 changes: 10 additions & 3 deletions XmppSharp.Expat/XmppSharp.Expat.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
<Copyright>nathan130200</Copyright>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/nathan130200/XmppSharp</RepositoryUrl>
<PackageReadmeFile>CHANGELOG.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
</PropertyGroup>

<ItemGroup>
Expand All @@ -42,9 +44,14 @@
</ItemGroup>

<ItemGroup>
<None Update="libexpat.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="CHANGELOG.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="..\LICENSE">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

</Project>
10 changes: 9 additions & 1 deletion CHANGELOG.md → XmppSharp/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,12 @@ ____

**3.1.4**
____
- Minor fixes around `XmppParser` and added helper method to advance and get next element.
- Minor fixes around `XmppParser` and added helper method to advance and get next element.

**3.1.5**
___
- Rename `XmppParser` to `DefaultXmppParser` to indicade this uses regular .NET `XmlReader` to parse xmpp packets.
- Add basic abstraction layer to implement your own xmpp parser. Also i'm releasing a separated package `XmppSharp.Expat` to provide expat XMPP parser implementation. (Note: You must install native libraries to use expat.
- Added `AsyncHelper` (from `AspNetCore` repo) to calling async functions in sync methods.

> In **XMPP#** repository i did an github actions to automatically build expat using vcpkg with most common systems: ubuntu, macos, windows but only x64 is working at this moment). Consider using [XmppShap.Expat](https://www.nuget.org/packages/XmppSharp.Expat/) package too if you need a fast and stable parser.
6 changes: 3 additions & 3 deletions XmppSharp/XmppSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
</PropertyGroup>

<PropertyGroup>
<Version>3.1.4</Version>
<Version>3.1.5</Version>
<DebugSymbols>true</DebugSymbols>
<Copyright>nathan130200</Copyright>
<PackageReadmeFile>CHANGELOG.md</PackageReadmeFile>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/nathan130200/XmppSharp</RepositoryUrl>
<PackageReadmeFile>CHANGELOG.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
Expand All @@ -42,7 +42,7 @@
</ItemGroup>

<ItemGroup>
<None Include="..\CHANGELOG.md">
<None Include="CHANGELOG.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
Expand Down

0 comments on commit 298e3d5

Please sign in to comment.