- 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