Lines Matching refs:rv
56 nsresult rv;
58 rv = in->Init(aFile, aIOFlags, aPerm, aBehaviorFlags);
59 if (NS_SUCCEEDED(rv))
62 return rv;
73 nsresult rv;
75 rv = in->Init(aFile, aIOFlags, aPerm, aBehaviorFlags);
76 if (NS_SUCCEEDED(rv))
79 return rv;
106 nsresult rv = aIInfo->GetParent(getter_AddRefs(parent));
107 NS_ENSURE_SUCCESS(rv, rv);
115 rv = parent->GetMethodCount(aParentMethodCount);
116 NS_ENSURE_SUCCESS(rv, rv);
117 rv = parent->GetConstantCount(aParentConstCount);
118 NS_ENSURE_SUCCESS(rv, rv);
122 return rv;
133 nsresult rv = aIInfo->GetIIDForParam(aMethodIndex, aParamInfo, &iid);
134 if (NS_FAILED(rv)) {
144 rv = (*aResult == nsnull) ? NS_ERROR_OUT_OF_MEMORY : NS_OK;
152 rv = (*aResult == nsnull) ? NS_ERROR_OUT_OF_MEMORY : NS_OK;
164 rv = iim->GetInfoForIID(iid, getter_AddRefs(info));
165 NS_ENSURE_SUCCESS(rv, rv);
167 if (NS_SUCCEEDED(rv)) {
170 if (NS_FAILED(rv) || !scriptable) {
172 rv = (*aResult == nsnull) ? NS_ERROR_OUT_OF_MEMORY : NS_OK;
176 rv = iim->GetNameForIID(iid, aResult);
183 return rv;
250 nsresult rv;
256 rv = iim->EnumerateInterfaces(getter_AddRefs(etor));
257 NS_ENSURE_SUCCESS(rv, rv);
264 rv = etor->CurrentItem(getter_AddRefs(item));
265 NS_ENSURE_SUCCESS(rv, rv);
284 rv = WriteOneInterface(iface);
285 NS_ENSURE_SUCCESS(rv, rv);
294 nsresult rv;
305 rv = TypeInfo::GetParentInfo(aIInfo, getter_AddRefs(parentInfo),
307 NS_ENSURE_SUCCESS(rv, rv);
315 rv = OpenIfaceFileStream(iface_name, getter_AddRefs(out));
316 NS_ENSURE_SUCCESS(rv, rv);
319 rv = WriteHeader(out, iface_name);
320 NS_ENSURE_SUCCESS(rv, rv);
321 rv = WriteInterfaceStart(out, aIInfo, parentInfo);
322 NS_ENSURE_SUCCESS(rv, rv);
323 rv = WriteIID(out, aIInfo);
324 NS_ENSURE_SUCCESS(rv, rv);
325 rv = WriteConstants(out, aIInfo, parentConstCount);
326 NS_ENSURE_SUCCESS(rv, rv);
327 rv = WriteMethods(out, aIInfo, parentMethodCount);
328 NS_ENSURE_SUCCESS(rv, rv);
329 rv = WriteInterfaceEnd(out);
330 NS_ENSURE_SUCCESS(rv, rv);
332 rv = CloseIfaceFileStream(out);
334 return rv;
340 nsresult rv;
344 rv = mOutputDir->Clone(getter_AddRefs(iface_file));
345 NS_ENSURE_SUCCESS(rv, rv);
349 rv = iface_file->Append(filename);
350 NS_ENSURE_SUCCESS(rv, rv);
357 rv = iface_file->Create(nsIFile::NORMAL_FILE_TYPE, 0644);
358 NS_ENSURE_SUCCESS(rv, rv);
362 rv = NS_NewLocalFileOutputStream(getter_AddRefs(out), iface_file);
363 NS_ENSURE_SUCCESS(rv, rv);
387 nsresult rv = out->Write(kHeader1, sizeof(kHeader1) - 1, &count);
388 NS_ENSURE_SUCCESS(rv, rv);
394 rv = out->Write(searchTerm.get(), PR_MIN(29, searchTerm.Length()), &count);
395 NS_ENSURE_SUCCESS(rv, rv);
397 rv = out->Write(kHeader2, sizeof(kHeader2) - 1, &count);
398 NS_ENSURE_SUCCESS(rv, rv);
399 rv = out->Write(kPackage, sizeof(kPackage) - 1, &count);
400 return rv;
413 nsresult rv = out->Write(kIfaceDecl1, sizeof(kIfaceDecl1) - 1, &count);
414 NS_ENSURE_SUCCESS(rv, rv);
415 rv = out->Write(iface_name, strlen(iface_name), &count);
416 NS_ENSURE_SUCCESS(rv, rv);
421 rv = out->Write(kParentDecl, sizeof(kParentDecl) - 1, &count);
422 NS_ENSURE_SUCCESS(rv, rv);
423 rv = out->Write(parent_name, strlen(parent_name), &count);
424 NS_ENSURE_SUCCESS(rv, rv);
427 rv = out->Write(kIfaceDecl2, sizeof(kIfaceDecl2) - 1, &count);
428 return rv;
467 nsresult rv = out->Write(kIIDDecl1, sizeof(kIIDDecl1) - 1, &count);
468 NS_ENSURE_SUCCESS(rv, rv);
469 rv = out->Write(iid_name.get(), iid_name.Length(), &count);
470 NS_ENSURE_SUCCESS(rv, rv);
471 rv = out->Write(kIIDDecl2, sizeof(kIIDDecl2) - 1, &count);
472 NS_ENSURE_SUCCESS(rv, rv);
473 rv = out->Write(iid_str, strlen(iid_str), &count);
474 NS_ENSURE_SUCCESS(rv, rv);
475 rv = out->Write(kIIDDecl3, sizeof(kIIDDecl3) - 1, &count);
476 NS_ENSURE_SUCCESS(rv, rv);
492 nsresult rv = aIInfo->GetConstantCount(&constCount);
493 NS_ENSURE_SUCCESS(rv, rv);
497 rv = aIInfo->GetConstant(i, &constInfo);
498 NS_ENSURE_SUCCESS(rv, rv);
501 rv = out->Write(kConstDecl1, sizeof(kConstDecl1) - 1, &count);
502 NS_ENSURE_SUCCESS(rv, rv);
504 rv = WriteType(out, &type, aIInfo, nsnull, nsnull);
505 NS_ENSURE_SUCCESS(rv, rv);
506 rv = out->Write(" ", 1, &count);
507 NS_ENSURE_SUCCESS(rv, rv);
509 rv = out->Write(name, strlen(name), &count);
510 NS_ENSURE_SUCCESS(rv, rv);
511 rv = out->Write(kConstDecl2, sizeof(kConstDecl2) - 1, &count);
512 NS_ENSURE_SUCCESS(rv, rv);
514 rv = WriteConstantValue(out, &type, constInfo->GetValue());
515 NS_ENSURE_SUCCESS(rv, rv);
516 rv = out->Write(kConstDecl3, sizeof(kConstDecl3) - 1, &count);
517 NS_ENSURE_SUCCESS(rv, rv);
596 nsresult rv = aIInfo->GetMethodCount(&methodCount);
597 NS_ENSURE_SUCCESS(rv, rv);
604 rv = aIInfo->GetMethodInfo(i, &methodInfo);
605 NS_ENSURE_SUCCESS(rv, rv);
633 rv = WriteOneMethod(out, aIInfo, methodInfo, i);
634 NS_ENSURE_SUCCESS(rv, rv);
650 nsresult rv = out->Write(kMethodDecl1, sizeof(kMethodDecl1) - 1, &count);
651 NS_ENSURE_SUCCESS(rv, rv);
664 rv = WriteParam(out, aIInfo, aMethodIndex, resultInfo, 0);
666 rv = out->Write(kVoidReturn, sizeof(kVoidReturn) - 1, &count);
668 NS_ENSURE_SUCCESS(rv, rv);
687 rv = out->Write(" ", 1, &count);
688 NS_ENSURE_SUCCESS(rv, rv);
689 rv = out->Write(method_name.get(), method_name.Length(), &count);
690 NS_ENSURE_SUCCESS(rv, rv);
691 rv = out->Write("(", 1, &count);
692 NS_ENSURE_SUCCESS(rv, rv);
701 rv = out->Write(kParamSeparator, sizeof(kParamSeparator) - 1, &count);
702 NS_ENSURE_SUCCESS(rv, rv);
705 rv = WriteParam(out, aIInfo, aMethodIndex, ¶mInfo, j + 1);
706 NS_ENSURE_SUCCESS(rv, rv);
709 rv = out->Write(kMethodDecl2, sizeof(kMethodDecl2) - 1, &count);
710 return rv;
718 nsresult rv = WriteType(out, &type, aIInfo, aMethodIndex, aParamInfo);
719 NS_ENSURE_SUCCESS(rv, rv);
724 rv = out->Write("[]", 2, &count);
725 NS_ENSURE_SUCCESS(rv, rv);
732 rv = out->Write(buf, strlen(buf), &count);
733 NS_ENSURE_SUCCESS(rv, rv);
750 nsresult rv;
754 rv = out->Write("byte", 4, &count);
759 rv = out->Write("short", 5, &count);
764 rv = out->Write("int", 3, &count);
769 rv = out->Write("long", 4, &count);
773 rv = out->Write("float", 5, &count);
779 rv = out->Write("double", 6, &count);
783 rv = out->Write("boolean", 7, &count);
788 rv = out->Write("char", 4, &count);
800 rv = out->Write("String", 6, &count);
806 rv = TypeInfo::GetInterfaceName(aIInfo, aMethodIndex, aParamInfo,
808 if (NS_FAILED(rv) || !iface_name) {
809 rv = NS_ERROR_FAILURE;
813 rv = out->Write(iface_name, strlen(iface_name), &count);
819 rv = out->Write("nsISupports", 11, &count);
823 rv = out->Write("int", 3, &count);
830 rv = aIInfo->GetTypeForParam(aMethodIndex, aParamInfo, 1, &xpttype);
831 if (NS_FAILED(rv))
834 rv = WriteType(out, &xpttype, aIInfo, aMethodIndex, aParamInfo);
835 if (NS_FAILED(rv))
838 rv = out->Write("[]", 2, &count);
848 return rv;
871 nsresult rv = NS_OK;
876 rv = RTR3InitExe(argc, &argv, 0);
886 rv = RTR3InitExe(argc, &argv, 0);
894 rv = NS_ERROR_FAILURE;
902 rv = NS_ERROR_FAILURE;
907 rv = NS_NewNativeLocalFile(nsDependentCString(argv[++i]), PR_TRUE,
910 if (NS_FAILED(rv) || NS_FAILED(output_dir->Exists(&val)) || !val ||
915 rv = NS_ERROR_FAILURE;
924 rv = NS_ERROR_FAILURE;
930 if (NS_FAILED(rv)) {
936 rv = com::Initialize();
938 rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
940 NS_ENSURE_SUCCESS(rv, rv);
943 rv = gen.GenerateInterfaces();
951 return rv;