ULONG CWdmDeviceAccess::GetAddress() { DEVICE_CAPABILITIES Capabilities; if (!NT_SUCCESS(QueryCapabilities(Capabilities))) { return NO_ADDRESS; } return Capabilities.Address; }
// ----------------------------------------------------------------------------- // AddTypedMenuItemL // // No menu item is added, if services are not found. This can happen if asyncronous // sending service update is not yet finished. // ----------------------------------------------------------------------------- // void CSendUiImpl::AddTypedMenuItemL( CSendUi::TSendUiMenuType aMenuType, CEikMenuPane& aMenuPane, TInt aIndex, TInt aCommandId, TSendingCapabilities aRequiredCapabilities ) { TInt i(0); TBool menuItemAdded = EFalse; TBuf<KTitleBufLength> menuItemName; // Read the resources aMenuType == CSendUi::ESendMenu ? i = R_SENDUI_MENUITEM_SEND : i = R_SENDUI_MENUITEM_WRITE; // CSendUi::EWriteMenu iCoeEnv->ReadResourceL( menuItemName, i ); for ( i = 0; i < iSendingServices.Count(); i++ ) { TUid serviceUid = iSendingServices[i]->ServiceId(); if ( QueryCapabilities( i, aRequiredCapabilities ) ) { CEikMenuPaneItem::SData data; data.iCascadeId = NULL; data.iText = menuItemName; data.iCommandId = aCommandId; if ( aIndex == aMenuPane.NumberOfItemsInPane() ) { aMenuPane.AddMenuItemL( data ); } else { aMenuPane.InsertMenuItemL( data, aIndex ); } menuItemAdded = ETrue; break; } } // Hide menu item if sending is already in progress. if ( menuItemAdded ) { aMenuPane.SetItemDimmed( aCommandId, iIsSending); } }