- This function gets GUIDs from SPD file accrodeing to <PPIs> information\r
- and write those GUIDs to AutoGen.c.\r
- \r
- @param fileBuffer\r
- String Buffer for Autogen.c file.\r
- @throws BuildException\r
- Guid must set value!\r
- **/\r
- void PpiGuidToAutogenC(StringBuffer fileBuffer) throws AutoGenException {\r
- String[] cNameGuid = null;\r
-\r
- //\r
- // Get the all PPI adn PPI Notify from MSA file,\r
- // then add those PPI ,and PPI Notify name to list.\r
- //\r
-\r
- String[] ppiList = saq.getPpiArray(this.arch);\r
- for (int i = 0; i < ppiList.length; i++) {\r
- this.mPpiList.add(ppiList[i]);\r
- }\r
-\r
- String[] ppiNotifyList = saq.getPpiNotifyArray(this.arch);\r
- for (int i = 0; i < ppiNotifyList.length; i++) {\r
- this.mPpiList.add(ppiNotifyList[i]);\r
- }\r
-\r
- //\r
- // Find CNAME and GUID from dependence SPD file and write to Autogen.c\r
- //\r
- Iterator ppiIterator = this.mPpiList.iterator();\r
- String ppiKeyWord = null;\r
- while (ppiIterator.hasNext()) {\r
- ppiKeyWord = ppiIterator.next().toString();\r
- cNameGuid = GlobalData.getPpiGuid(this.mDepPkgList, ppiKeyWord);\r
- if (cNameGuid != null) {\r
- fileBuffer.append("\r\nGLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID ");\r
- fileBuffer.append(cNameGuid[0]);\r
- fileBuffer.append(" = { ");\r
- fileBuffer.append(CommonDefinition.formatGuidName(cNameGuid[1]));\r
- fileBuffer.append(" } ;");\r
- } else {\r
- //\r
- // If can't find Ppi GUID declaration in every package\r
- //\r
- throw new AutoGenException("Can not find Ppi GUID ["\r
- + ppiKeyWord + "] declaration in any SPD package!");\r
- }\r
- }\r
- }\r
-\r
- /**\r
- ProtocolGuidToAutogenc\r
- \r
- This function gets GUIDs from SPD file accrodeing to <Protocol>\r
- information and write those GUIDs to AutoGen.c.\r
- \r
- @param fileBuffer\r
- String Buffer for Autogen.c file.\r
- @throws BuildException\r
- Protocol name must set.\r
- **/\r
- void ProtocolGuidToAutogenC(StringBuffer fileBuffer) throws EdkException {\r
- String[] cNameGuid = null;\r
-\r
- String[] protocolList = saq.getProtocolArray(this.arch);\r
-\r
- //\r
- // Add result to Autogen global list.\r
- //\r
- for (int i = 0; i < protocolList.length; i++) {\r
- this.mProtocolList.add(protocolList[i]);\r
- }\r
-\r
- String[] protocolNotifyList = saq.getProtocolNotifyArray(this.arch);\r
-\r
- for (int i = 0; i < protocolNotifyList.length; i++) {\r
- this.mProtocolList.add(protocolNotifyList[i]);\r
- }\r
-\r
- //\r
- // Get the NAME and GUID from dependence SPD and write to Autogen.c\r
- //\r
- Iterator protocolIterator = this.mProtocolList.iterator();\r
- String protocolKeyWord = null;\r
-\r
-\r
- while (protocolIterator.hasNext()) {\r
- protocolKeyWord = protocolIterator.next().toString();\r
- cNameGuid = GlobalData.getProtocolGuid(this.mDepPkgList, protocolKeyWord);\r
- if (cNameGuid != null) {\r
- fileBuffer.append("\r\nGLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID ");\r
- fileBuffer.append(cNameGuid[0]);\r
- fileBuffer.append(" = { ");\r
- fileBuffer.append(CommonDefinition.formatGuidName(cNameGuid[1]));\r
- fileBuffer.append(" } ;");\r
- } else {\r
- //\r
- // If can't find protocol GUID declaration in every package\r
- //\r
- throw new AutoGenException("Can not find protocol Guid ["\r
- + protocolKeyWord + "] declaration in any SPD package!");\r
- }\r
- }\r
- }\r
-\r
- /**\r
- GuidGuidToAutogenc\r
- \r
- This function gets GUIDs from SPD file accrodeing to <Guids> information\r
- and write those GUIDs to AutoGen.c.\r