Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
add LICENSE
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericrous committed Aug 18, 2015
1 parent bde83cb commit 1c6db02
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 17 deletions.
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Zougi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Binary file modified LyncLogger.v11.suo
Binary file not shown.
12 changes: 12 additions & 0 deletions LyncLogger/LyncLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,18 @@ static void callImModality_ModalityStateChanged(ModalityStateChangedEventArgs e,
}
}
}

//record conversation
if (e.NewState == ModalityState.Connected) // || e.NewState == ModalityState.Connecting)
{
AudioLogger.Start(fileLog);
}

//end recording
if (e.NewState == ModalityState.Disconnected)
{
AudioLogger.Stop();
}
}

/// <summary>
Expand Down
9 changes: 9 additions & 0 deletions LyncLogger/LyncLogger.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="CSCore, Version=1.0.0.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\CSCore.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\log4net.2.0.3\lib\net40-full\log4net.dll</HintPath>
Expand All @@ -70,10 +74,14 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AudioLogger.cs" />
<Compile Include="LyncLogger.cs" />
<Compile Include="NotifyIconSystray.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SoundManager\SilenceGenerator.cs" />
<Compile Include="SoundManager\SimpleMixer.cs" />
<Compile Include="SoundManager\SoundRecorder.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
Expand All @@ -96,6 +104,7 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
41 changes: 40 additions & 1 deletion LyncLogger/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.IO;
using System.ComponentModel;
using log4net;
using Microsoft.Win32;

namespace LyncLogger
{
Expand Down Expand Up @@ -39,9 +40,22 @@ static void Main(string[] args)

//-- -- -- Add notification icon
NotifyIconSystray.addNotifyIcon("Lync Logger", new MenuItem[] {
new MenuItem("Lync History", (s, e) => { Process.Start(LOG_FOLDER); })
new MenuItem("Lync History", (s, e) => { Process.Start(LOG_FOLDER); }),
new MenuItem("Switch Audio logger On/Off", (s, e) => { AudioLogger.Switch(); })
});

//-- -- -- Handles Sound record operations

registerKey("Software\\LyncLogger", "Audio", "Activated");

//BackgroundWorker bw_soundrecord = new BackgroundWorker();
//bw_soundrecord.DoWork += (s, e) =>
//{
AudioLogger.Initialize(LOG_FOLDER);

//};
//bw_soundrecord.RunWorkerAsync();

//-- -- -- Handles LYNC operations
BackgroundWorker bw = new BackgroundWorker();
bw.DoWork += (s, e) =>
Expand Down Expand Up @@ -71,6 +85,31 @@ static void Main(string[] args)
//prevent the application from exiting right away
Application.Run();
}


/// <summary>
/// Create registry key to keep settings of recording for audio
/// If registry key already exists, set AudioLogger
/// </summary>
/// <param name="keyName"></param>
/// <param name="valueName"></param>
/// <param name="value"></param>
private static void registerKey(string keyName, string valueName, string value)
{
RegistryKey key = Registry.CurrentUser;
RegistryKey LyncLoggerKey = key.OpenSubKey(keyName);
if (LyncLoggerKey != null)
{
AudioLogger.isAllowedRecording = ((string)LyncLoggerKey.GetValue(valueName) == value);
LyncLoggerKey.Close();
}
else
{
RegistryKey subkey = key.CreateSubKey(keyName);
subkey.SetValue(valueName, value);
subkey.Close();
}
}

}
}
28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,7 @@ Right-click brings a menu. You can access the history folder from there or close
## Download

Download the latest version of LyncLogger here:
https://github.com/Zougi/LyncLogger/releases/download/v1.1/LyncLogger.v1.1.zip

## Requirement

This project depends on Microsoft dll:
- Microsoft.Lync.Model.dll
- Microsoft.Office.Uc.dll

Both are available at:
- http://www.microsoft.com/en-us/download/details.aspx?id=18898 (Lync 2010)
- http://www.microsoft.com/en-us/download/details.aspx?id=36824 (Lync 2013)

You should put these dll in the same folder as the executable

The executable also depends on a icon which will appear in the systray bar.
This icon should be in the same folder and called icon.ico
https://github.com/Zougi/LyncLogger/releases/download/v1.1/LyncLogger-v1-1.zip


## Notes
Expand All @@ -44,6 +29,17 @@ Log files are located to "%appdata%/Lync logs" folder
Sources of the program are located in ./src folder


## How to contribute

This project depends on Microsoft dll:
- Microsoft.Lync.Model.dll
- Microsoft.Office.Uc.dll

Both are available at:
- http://www.microsoft.com/en-us/download/details.aspx?id=18898 (Lync 2010)
- http://www.microsoft.com/en-us/download/details.aspx?id=36824 (Lync 2013)


## TODO

log audio conversations

0 comments on commit 1c6db02

Please sign in to comment.