Application Interworking(AIW)(日本語)
hamishwillee
(Talk | contribs) m (Hamishwillee - Adding missing translation link) |
|||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| + | {{ArticleMetaData | ||
| + | |sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] --> | ||
| + | |installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) --> | ||
| + | |devices= <!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') --> | ||
| + | |sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) --> | ||
| + | |platform= <!-- Compatible platforms - e.g. Symbian^1 and later, Qt 4.6 and later --> | ||
| + | |devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) --> | ||
| + | |dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 --> | ||
| + | |signing=<!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer --> | ||
| + | |capabilities=<!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. --> | ||
| + | |keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase --> | ||
| + | |id= <!-- Article Id (Knowledge base articles only) --> | ||
| + | |language=Lang-Japanese | ||
| + | |translated-by=[[User:Masatoshi]] | ||
| + | |translated-from-title=Application Interworking(AIW) | ||
| + | |translated-from-id=26249 | ||
| + | |review-by=<!-- After re-review: [[User:username]] --> | ||
| + | |review-timestamp=<!-- After re-review: YYYYMMDD --> | ||
| + | |update-by=<!-- After significant update: [[User:username]]--> | ||
| + | |update-timestamp=<!-- After significant update: YYYYMMDD --> | ||
| + | |creationdate=20080416 | ||
| + | |author=[[User:Alice77]] | ||
| + | }} | ||
| + | |||
アプリケーション・インターワーキング(アプリケーション間の相互作用, Application Interwoking, AIW)フレームワークは、既存のコードへの静的リンクやデバイスにどんなサービスが利用可能か前もって知ること無しに、機能をアプリケーションに動的に追加する仕組みです | アプリケーション・インターワーキング(アプリケーション間の相互作用, Application Interwoking, AIW)フレームワークは、既存のコードへの静的リンクやデバイスにどんなサービスが利用可能か前もって知ること無しに、機能をアプリケーションに動的に追加する仕組みです | ||
| Line 93: | Line 117: | ||
| − | [[Category:Lang- | + | [[Category:Lang-Japanese]][[Category:Symbian C++]] [[Category:S60]] [[Category:Telephony]] [[Category:Essential Idioms]][[Category:Code Examples]] |
| + | <!-- Translation --> [[en:Application Interworking(AIW)]] | ||
| + | <!-- Translation --> [[ru:Взаимодействие приложений (AIW)]] | ||
Revision as of 07:29, 16 December 2011
Article Metadata
アプリケーション・インターワーキング(アプリケーション間の相互作用, Application Interwoking, AIW)フレームワークは、既存のコードへの静的リンクやデバイスにどんなサービスが利用可能か前もって知ること無しに、機能をアプリケーションに動的に追加する仕組みです
基準アイテム(criteria item)は、あるAIWサービスを明記します。コンシューマ・アプリケーションは、そのAIWサービスを使用に興味があります。基準アイテムの配列をインタレスト(interest)と呼びます。コンシューマ・アプリケーションのインタレストは、そのリソース・ファイルに定義するか、CAiwCriteiraItem を使って動的に定義します。AIW フレームワークは、基準アイテムを使って、適切なサービス・プロバイダ(provider)を利用可能かどうか調べ、要求されたプロバイダを初期化します。
AIWフレームワークのメイン・クラスは、CAiwServiceHandler です。これは、コンシューマ側のAIW APIを実装します。AIWサービスを使う各アプリケーションは、このクラスのインスタンスを生成しなければいけません。サービス・ハンドラ(handler)は、コンシューマ・アプリケーションにサービスを提供するサービス・プロバイダの、動的なロードをサポートします。インタレストとデータ引数を通して、サービス・ハンドラは、コンシューマとサービス・プロバイダを相互に対応付け、プロバイダからコンシューマを隠します。
例:もしサード・パーティ・アプリケーションが電話を発呼したい場合、その機能をもつプロバイダを使用することが出来ます。コンシューマ・アプリケーションは、CAiwCriteriaItem かrssファイルに詳細を記述することで、そのようなサービスを使いたいことを以下のように明記します。
// Specifying dynamically
CAiwCriteriaItem* criteria = CAiwCriteriaItem::NewLC(
KAiwCmdCall, KAiwCmdCall,
_L8( "*" ) );
// using rss file
RESOURCE AIW_INTEREST r_aiwconsumerapp_interest1
{
items =
{
AIW_CRITERIA_ITEM
{
id = EAIWPlaceHolder;
serviceCmd = KAiwCmdCall; //from aiwcommon.hrh
serviceClass = KAiwClassMenu; //from aiwcommon.hrh
contentType = "*";
//defaultProvider = 0x101F868E;
maxProviders =1;
}
};
}
このリソースIdは、サービス・ハンドラのAttachL()メソッドに渡されます。コンシューマとプロバイダ間でデータを渡すために、AIWフレームワークは、ジェネリック・パラメータ・リスト(generic parameter list)を使います。ジェネリック・パラメータ・リストのアイテムは、セマンティックIDを持ち、これは、アイテムが持つデータの方を定義しています。これらセマンティックIDの値は、AIWGenericParams.hrh で定義されています。
例えば、発呼する場合、電話番号や通話の種類(テレビ電話、音声、VoIP)、発呼者名などの詳細を渡す必要があります。これらの値は、TAiwDialDataV1 を使って渡され、これは、EGenericParamCallDialDataV1 を明記することでプロバイダに通知されます。
CAiwServiceHandler* serviceHandler = CAiwServiceHandler::NewLC();
// Create AIW interest
RCriteriaArray interest;
CleanupClosePushL( interest );
CAiwCriteriaItem* criteria = CAiwCriteriaItem::NewLC(
KAiwCmdCall, KAiwCmdCall,
_L8( "*" ) );
TUid base;
base.iUid = KAiwClassBase;
criteria->SetServiceClass( base );
User::LeaveIfError( interest.Append( criteria ) );
// Attach to AIW interest
serviceHandler->AttachL( interest );
// Create AIW param package
TAiwDialDataV1 data;
TAiwDialDataV1Pckg dataPckg( data );
iNameBuffer = aName.Left( iNameBuffer.MaxLength() );
data.SetName( iNameBuffer );
iTelNumber = aNumber.Left( iTelNumber.MaxLength() );
data.SetTelephoneNumber( iTelNumber );
data.SetCallType( aCallType );
data.SetWindowGroup( CCoeEnv::Static()->RootWin().Identifier() );
CAiwGenericParamList& paramList = serviceHandler->InParamListL();
TPtrC8 ptr;
ptr.Set( dataPckg );
TAiwVariant variant( ptr );
TAiwGenericParam param( EGenericParamCallDialDataV1, variant );
paramList.AppendL( param );
// Execute AIW command
serviceHandler->ExecuteServiceCmdL( KAiwCmdCall, paramList,
serviceHandler->OutParamListL() );
CleanupStack::PopAndDestroy( 3 ); // criteria, interest, serviceHandler

