Weitere ähnliche Inhalte Ähnlich wie Lync Client 開発概観 (20) Lync Client 開発概観2. Lync のお話です
Link? LINQ? いいえ、Lync
ユニファイド コミュニケーション プラットフォーム
◦ Microsoft Lync 2010
◦ Microsoft Lync 2013 Preview
みなさん、 使っていますか?
2
3. Agenda
What’s Lync ? Lync Client SDK
Lync Client 開発概観 Lync 2013 SDK Conclusion
3
4. Microsoft Lync 2013 Preview
◦ プレビュー版に関する話題が含まれます
◦ 正式リリース時には変更される可能性があります
4
5. 自己紹介
亀谷 学人 (かめや まなと)
某メーカー系 SIer 勤務
◦ C# / WPF クライアント アプリケーション開発
◦ Microsoft Lync 2010 連携ソリューション
◦ #定時退社マン (23 時)
Blog: http://grabacr.net/
Twitter: @Grabacr07
5
6. Agenda
What’s Lync ? Lync Client SDK
Lync Client 開発概観 Lync 2013 SDK Conclusion
6
7. What’s Lync?
Microsoft
Lync = Link + Sync
つなぐ 同期する
いつでも、どこからでも、人と人をつなぐ新しい方法
◦ Microsoft Office Communicator 2007
◦ Microsoft Lync 2010
◦ Microsoft Lync 2013 Preview
7
8. What’s Lync?
ユニファイド コミュニケーション
Outlook 連絡先統合
プレゼンス情報
ユーザーの検索
スキル検索 (SharePoint 連携)
IM (チャット)
音声 / ビデオ / 外線通話
オンライン会議
8
10. What’s Lync?
Conversation Window 音声通話をしながら
デスクトップや
アプリケーションを共有
10
11. What’s Lync?
インスタント メッセージング / プレゼンス
音声 / ビデオ / オンライン会議
エンタープライズ ボイス
(PBX 連携/代替、VoIP 外線通話)
11
12. What’s Lync?
Demonstration
Microsoft Lync 2013 Preview
12
13. Agenda
What’s Lync ? Lync Client SDK
Lync Client 開発概観 Lync 2013 SDK Conclusion
13
14. Lync 開発概観
Lync Server
Lync Server 2010 SDK
Lync Client Lync Server 2013 Persistent Chat Server SDK (Preview)
Lync 2010 SDK
Lync 2013 SDK Preview
UCMA Server
Unified Communications Managed API 3.0
Unified Communications Managed API 4.0
14
15. Lync 2010 SDK
Microsoft Lync 2010 SDK
http://www.microsoft.com/en-us/download/details.aspx?id=30350
◦ Visual Studio 2008 SP1 / 2010
◦ .NET Framework 3.5 / 4.0
◦ Silverlight 4.0 runtime
Microsoft Silverlight 4 Tools for Visual Studio 2010
15
18. Lync クライアント 開発スタイル (1)
アプリケーションに Lync 連携機能
Lync Extensibility API
◦ Microsoft.Lync.Model.Extensibility 名前空間
◦ Automation クラス
Conversation の開始
(Modality: IM, Audio, Video, File transfer, app sharing)
Conference への参加
Contact 追加ウィザード
◦ Lync Client の起動が前提
18
19. Automation クラス
Demonstration
Automation class
BeginStartConversation method
19
20. Lync クライアント 開発スタイル (1)
アプリケーションに Lync 連携機能
Lync Controls
◦ Microsoft.Lync.Controls 名前空間
◦ WPF / Silverlight で使える Lync コントロール群
xmlns:lync="clr-namespace:Microsoft.Lync.Controls;assembly=Microsoft.Lync.Controls"
<lync:PresenceIndicator
x:Name="Presence"
Source="sip:patchouli@grabacr07.local"
HoverAction="ShowContactBrief"
PhotoDisplayMode="Large" />
<TextBlock
Text="{Binding DisplayName,
ElementName=Presence}"
Margin="4,0,0,0"
VerticalAlignment="Center" />
20
22. Lync クライアント 開発スタイル (1)
アプリケーションに Lync 連携機能
Lync クライアントに対する操作
◦ Lync へのサイン イン / サイン アウト
◦ ユーザーの検索
◦ ユーザーの (コンタクト リストへの) 追加 / 移動 / 削除
会議に対する操作
◦ メッセージの送受信
◦ 音声会議の保留 / 再開 / 転送 など
22
23. Object Model
Conversation e.g.
BeginSendMessage method
IDictionary<ModalityTypes, Modality>
InstantMessageReceived event
Modalities
property IsTyping property
ModalityTypes.InstantMessage
InstantMessageModality class
ModalityTypes.AudioVideo
AVModality class
e.g.
Participants AudioChannel property
property IList<Participant> VideoChannel property
23
24. Object Model
Instant message の場合
var imModality =
conversation.Modalities[ModalityTypes.InstantMessage]
as InstantMessageModality;
imModality.BeginSendMessage(
"会話を開始しました!",
ar =>
{
var modality = ar.AsyncState as InstantMessageModality;
modality.EndSendMessage(r);
},
imModality);
24
26. Lync クライアント 開発スタイル (2)
Lync クライアントを自分で構築
独自のコミュニケーション クライアントを実装
◦ Lync をベースに、でも Lync の UI は使いたくない?
UI Suppression Mode
◦ Lync クライアントの UI が
表示されなくなる
(プロセスは実行される)
◦ 設定方法はレジストリ
(またはインストール オプション)
26
27. Lync クライアント 開発スタイル (2)
UI Suppression Mode
ユーザー単位の
どういうときに使うべき? 使い分け不可
◦ Lync 2010 はレジストリの HKLM で設定
[HKEY_LOCAL_MACHINESoftwareMicrosoftCommunicator]
"UISuppressionMode"=dword:00000001
◦ 例1: 会議室の据え置き PC 上 + ホワイトボード
◦ 例2: 会社の受付 (無人) … 担当呼び出し用クライアント
◦ Lync 2013 (Preview) は以下に変更
[HKEY_CURRENT_USERSoftwareMicrosoftOffice15.0Lync]
"UISuppressionMode"=dword:00000001
27
28. Lync クライアント 開発スタイル (2)
UI Suppression Mode
アプリケーションの起動と終了
◦ [スタート] メニューからは Lync が起動できなくなる
LyncClient.BeginInitialize メソッド
var lyncClient = LyncClient.GetClient();
if (lyncClient.State == ClientState.Uninitialized)
{
lyncClient.BeginInitialize(ar =>
{
var client = ar.AsyncState as LyncClient;
client.EndInitialize(ar);
}, lyncClient);
}
28
29. Lync クライアント 開発スタイル (2)
UI Suppression Mode
アプリケーションの起動と終了
◦ サイン イン、Lync のシャットダウン等も API から
if (lyncClient.State != ClientState.SignedIn)
{
lyncClient.BeginSignIn(
@"sip:patchouli@grabacr07.local",
@"grabacr07.localpatchouli",
"password",
ar =>
{
var client = ar.AsyncState as LyncClient;
client.EndSignIn(ar);
},
lyncClient);
※ サイン イン / サイン アウトの制御は
}
UI Suppression Mode でなくとも可能
29
30. Lync クライアント 開発スタイル (2)
UI Suppression Mode
注意点いろいろ
◦ Automation クラスは使えない
◦ Lync Controls も使えない
◦ Lync クライアント連携アプリは起動できなくすべき
LyncClient.InSuppressedMode プロパティ
if (LyncClient.GetClient().InSuppressedMode)
{
MessageBox.Show(
"Lync is configured for full user interface suppression");
return;
}
30
33. Lync クライアント 開発スタイル (3)
Lync クライアント内にカスタム機能
CWE (Conversation Window Extension)
会話ウィンドウの右ペインで
カスタム アプリケーションを提供
Lync の会話ウィンドウ
HTML ベースでホスト可能
ex)・ Web サーバー
・ 共有フォルダー
・ Windows Azure
33
34. Lync クライアント 開発スタイル (3)
Conversation Window 拡張
登録方法 1 … Install Registration 適当な GUID
を割り当て
◦ 利用する PC でレジストリ登録が必要
Windows Registry Editor Version 5.00
ExtensibilityWindowSize
[HKEY_CURRENT_USERSoftwareMicrosoftCommunicator x 200 px
0: 300
ContextPackages{12345678-9ABC-DEF0-1234-56789ABC}] x 400 px
1: 600
2: 800 x 600 px
"Name"="Sample CWE Application 1"
"ExtensibilityWindowSize"=dword:00000001
拡張機能の URL
"ExternalURL"="http://grabacr.net/CWESample.html"
※ IE の信頼済みサイトに
"InternalURL"="http://grabacr.net/CWESample.html"
登録する必要があります
◦ レジストリ登録しておけば、いつでも呼び出せる
34
35. Lync クライアント 開発スタイル (3)
Conversation Window 拡張
Demonstration
Conversation Window Extensions
Install Registration
35
36. Lync クライアント 開発スタイル (3)
Conversation Window 拡張
登録方法 2 … Run-Time Registration
◦ 実行時にプログラムから拡張機能を登録
◦ ユーザーが Lync にサイン インしている間のみ
var registration =
LyncClient.GetClient().CreateApplicationRegistration(
"{12345678-9ABC-DEF0-1234-56789ABC}",
"Run-Time Registration Test");
registration.SetExtensibilityWindowProperties(
"http://grabacr.net/profile",
"http://grabacr.net/profile",
ConversationWindowExtensionSize.Medium);
registration.AddRegistration();
36
37. Lync クライアント 開発スタイル (3)
Conversation Window 拡張
登録方法 1 … Install Registration
◦ レジストリ登録が必要 / いつでも使える
登録方法 2 … Run-Time Registration
◦ レジストリ登録が不要 / サイン インしている間のみ
いずれの場合も
会話するユーザー同士が事前に登録しておく
38
38. Agenda
What’s Lync ? Lync Client SDK
Lync Client 開発概観 Lync 2013 SDK Conclusion
39
39. Lync 2013 SDK
Microsoft Lync 2013 SDK (Preview)
http://www.microsoft.com/en-us/download/details.aspx?id=30350
◦ Visual Studio 2010
◦ .NET Framework 4.0
◦ Silverlight 5.0
Microsoft Silverlight 5 Tools for Visual Studio 2010 SP1
◦ Visual Studio 2012 + .NET Framework 4.5 でも動きました
40
41. Resource sharing
リソース共有機能そのものは Lync 2010 から
◦ デスクトップ
◦ モニター
プライマリ
セカンダリ
etc…
◦ アプリケーション
42
42. Resource sharing
Lync 2010 SDK では API 提供されず
Lync 2013 SDK (Preview) に API が追加
◦ Microsoft.Lync.Model.Conversation.Sharing 名前空間
◦ リソース共有の開始 / 停止
デスクトップ / モニター / アプリケーション
◦ 制御権の 要求 / 解放、許可 / 拒否、譲渡 / 取消
(聴講者) (発表者)
43
43. Object Model
Conversation
IDictionary<ModalityTypes, Modality>
Modalities
property
ModalityTypes.InstantMessage
InstantMessageModality class
e.g.
ModalityTypes.AudioVideo
SharableResources property
AVModality class BeginShareResource method
BeginRequestControl method
ControllerChanged event
ModalityTypes.ApplicationSharing
ApplicationSharingModality class
44
44. Resource sharing
ApplicationSharingModality クラス
var sharingModality =
conversation.Modalities[ModalityTypes.ApplicationSharing]
as ApplicationSharingModality;
ModalityTypes.ApplicationSharing
appSharingModality.BeginShareResources( (新規追加)
appSharingModality.ShareableResources[index],
ar =>
SharingResourceList
{
var modality = ar.AsyncState 共有可能なリソースの
as ApplicationSharingModality; コレクション
modality.EndShareResources(ar);
},
appSharingModality);
45
46. Other additional API
Meeting content management
◦ ホワイトボード
◦ PowerPoint ドキュメント
◦ 添付ファイル
Lync 2010 からの機能
◦ Lync 2013 SDK (Preview) で API 追加
◦ Microsoft.Lync.Model.Conversation.Sharing 名前空間
47
47. Other additional API
通常の使い方 !
Hello!
◦ ユーザーが Instant message
ユーザーを呼び出し Conversation
常設チャットルーム機能
◦ Persistent Chat API
Microsoft.Lync.Model.Room
・What do you …
名前空間 ・I think …
Room
48
48. Lync 2013 SDK (Preview) の注意点
Lync Controls
◦ コントロールがすべて Lync 2010 のまま
ドキュメント
◦ “Microsoft Lync 15 SDK Help” が同梱 しかし…
中身は “Microsoft Lync 2010 SDK Help” そのまま
49
49. Agenda
What’s Lync ? Lync Client SDK
Lync Client 開発概観 Lync 2013 SDK Conclusion
50
50. Conclusion
Lync = Link + Sync
コミュニケーション手段を統合
(ユニファイド コミュニケーション)
◦ インスタント メッセージ
◦ 音声通話
◦ リソース共有 (デスクトップ / モニター / アプリケーション)
51
51. Conclusion
Lync Client 開発スタイル
◦ アプリケーションに Lync 連携機能を追加
Automation class, Lync Controls
◦ Lync クライアントを自分で構築
UI Suppression Mode
◦ Lync クライアント内にカスタム機能を追加
Conversation Window Extensions
52
52. Conclusion
Lync 2013 SDK Preview
◦ Resource sharing
◦ Meeting content management
◦ Persistent Chat API
53