bool SmsRequestParent::DoRequest(const GetMessageRequest& aRequest) { nsCOMPtr<nsISmsDatabaseService> smsDBService = do_GetService(SMS_DATABASE_SERVICE_CONTRACTID); NS_ENSURE_TRUE(smsDBService, true); mSmsRequest = SmsRequest::Create(this); nsCOMPtr<nsISmsRequest> forwarder = new SmsRequestForwarder(mSmsRequest); nsresult rv = smsDBService->GetMessageMoz(aRequest.messageId(), forwarder); NS_ENSURE_SUCCESS(rv, false); return true; }
bool SmsRequestParent::DoRequest(const GetMessageRequest& aRequest) { nsresult rv = NS_ERROR_FAILURE; nsCOMPtr<nsIMobileMessageDatabaseService> dbService = do_GetService(MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID); if (dbService) { rv = dbService->GetMessageMoz(aRequest.messageId(), this); } if (NS_FAILED(rv)) { return NS_SUCCEEDED(NotifyGetMessageFailed(nsIMobileMessageCallback::INTERNAL_ERROR)); } return true; }